Skip to content

Commit

Permalink
use new config vars for html index writing
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate committed Apr 24, 2019
1 parent 6235d85 commit 461a8b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions archivebox/legacy/storage/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
FOOTER_INFO,
ARCHIVE_DIR_NAME,
HTML_INDEX_FILENAME,
STATIC_DIR_NAME,
ROBOTS_TXT_FILENAME,
FAVICON_FILENAME,
)
from ..util import (
enforce_types,
Expand All @@ -40,9 +43,9 @@
def write_html_main_index(links: List[Link], out_dir: str=OUTPUT_DIR, finished: bool=False) -> None:
"""write the html link index to a given path"""

copy_and_overwrite(join(TEMPLATES_DIR, 'favicon.ico'), join(out_dir, 'favicon.ico'))
copy_and_overwrite(join(TEMPLATES_DIR, 'robots.txt'), join(out_dir, 'robots.txt'))
copy_and_overwrite(join(TEMPLATES_DIR, 'static'), join(out_dir, 'static'))
copy_and_overwrite(join(TEMPLATES_DIR, FAVICON_FILENAME), join(out_dir, FAVICON_FILENAME))
copy_and_overwrite(join(TEMPLATES_DIR, ROBOTS_TXT_FILENAME), join(out_dir, ROBOTS_TXT_FILENAME))
copy_and_overwrite(join(TEMPLATES_DIR, STATIC_DIR_NAME), join(out_dir, STATIC_DIR_NAME))

rendered_html = main_index_template(links, finished=finished)
atomic_write(rendered_html, join(out_dir, HTML_INDEX_FILENAME))
Expand Down

0 comments on commit 461a8b0

Please sign in to comment.