Browse Source

only show archive.org if enabled

Nick Sweeting 4 years ago
parent
commit
15e87353bd
2 changed files with 4 additions and 0 deletions
  1. 2 0
      archivebox/index/html.py
  2. 2 0
      archivebox/index/schema.py

+ 2 - 0
archivebox/index/html.py

@@ -23,6 +23,7 @@ from ..config import (
     GIT_SHA,
     FOOTER_INFO,
     HTML_INDEX_FILENAME,
+    SAVE_ARCHIVE_DOT_ORG,
 )
 
 MAIN_INDEX_TEMPLATE = 'static_index.html'
@@ -103,6 +104,7 @@ def link_details_template(link: Link) -> str:
         'status': 'archived' if link.is_archived else 'not yet archived',
         'status_color': 'success' if link.is_archived else 'danger',
         'oldest_archive_date': ts_to_date(link.oldest_archive_date),
+        'SAVE_ARCHIVE_DOT_ORG': SAVE_ARCHIVE_DOT_ORG,
     })
 
 @enforce_types

+ 2 - 0
archivebox/index/schema.py

@@ -412,6 +412,8 @@ class Link:
         """predict the expected output paths that should be present after archiving"""
 
         from ..extractors.wget import wget_output_path
+        # TODO: banish this awful duplication from the codebase and import these
+        # from their respective extractor files
         canonical = {
             'index_path': 'index.html',
             'favicon_path': 'favicon.ico',