瀏覽代碼

fix title showing up as None in some UI spots

Nick Sweeting 6 年之前
父節點
當前提交
935dcac0c7
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      archivebox/index.py
  2. 1 0
      archivebox/util.py

+ 1 - 0
archivebox/index.py

@@ -143,6 +143,7 @@ def write_html_link_index(out_dir, link):
         f.write(Template(link_html).substitute({
             **link,
             **link['latest'],
+            'title': link['title'] or link['url'],
             'type': link['type'] or 'website',
             'tags': link['tags'] or 'untagged',
             'bookmarked': datetime.fromtimestamp(float(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),

+ 1 - 0
archivebox/util.py

@@ -526,6 +526,7 @@ def derived_link_info(link):
         'screenshot_link': 'archive/{timestamp}/screenshot.png'.format(**link),
         'dom_link': 'archive/{timestamp}/output.html'.format(**link),
         'archive_org_url': 'https://web.archive.org/web/{base_url}'.format(**link),
+        'title': link['title'] or link['url'],
     }
 
     # PDF and images are handled slightly differently