mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-23 11:17:02 -04:00
Update archivebox/index.py
Co-Authored-By: Nick Sweeting <git@sweeting.me>
This commit is contained in:
parent
eb641b3e35
commit
2e4b506c21
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ def patch_links_index(link, out_dir=OUTPUT_DIR):
|
||||||
# Patch HTML index
|
# Patch HTML index
|
||||||
html_path = os.path.join(out_dir, 'index.html')
|
html_path = os.path.join(out_dir, 'index.html')
|
||||||
with open(html_path, 'r') as html_file:
|
with open(html_path, 'r') as html_file:
|
||||||
html = [line[:-1] for line in html_file]
|
html = html_file.read().splitlines()
|
||||||
for idx, line in enumerate(html):
|
for idx, line in enumerate(html):
|
||||||
if title and ('<span data-title-for="{}"'.format(link['url']) in line):
|
if title and ('<span data-title-for="{}"'.format(link['url']) in line):
|
||||||
html[idx] = '<span>{}</span>'.format(title)
|
html[idx] = '<span>{}</span>'.format(title)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue