1
0
Fork 0
mirror of synced 2024-06-26 18:10:24 +12:00

only show archive.org if enabled

This commit is contained in:
Nick Sweeting 2021-01-30 22:03:59 -05:00
parent 846c966c4d
commit 15e87353bd
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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',