No need to re-link videos or hrefs.

This commit is contained in:
Sergio Martínez Portela 2023-10-03 00:08:07 +02:00
parent 650b16df32
commit bd644e3788

View File

@ -296,15 +296,6 @@ def summarize(doc):
for child in summary.children:
result.append(child)
# Update summary links and hrefs
for v in result.find_all('video') + result.find_all('image'):
if 'src' in v.attrs and ':' not in v['src']:
v['src'] = '/blog/' + v['src'].lstrip('/')
for v in result.find_all('a'):
if 'href' in v.attrs and ':' not in v['href']:
v['href'] = '/blog/' + v['href'].lstrip('/')
return result
def render_index(docs, dest_top):