create robots.txt in output dir

This commit is contained in:
Nick Sweeting 2018-09-12 19:25:48 -04:00
parent 451cea47e6
commit 8a23358fc8

View file

@ -72,6 +72,9 @@ def write_html_links_index(out_dir, links):
copy_tree(os.path.join(TEMPLATES_DIR, 'static'), os.path.join(out_dir, 'static'))
with open(os.path.join(out_dir, 'robots.txt'), 'w+') as f:
f.write('User-agent: *\nDisallow: /')
with open(os.path.join(TEMPLATES_DIR, 'index.html'), 'r', encoding='utf-8') as f:
index_html = f.read()