generating with dir and index

This commit is contained in:
aliabd 2022-02-08 01:24:33 +04:00
parent dbd47d8746
commit dba4172474

View File

@ -68,7 +68,9 @@ def render_guides_main():
with open("src/guides_main_template.html", encoding='utf-8') as template_file:
template = Template(template_file.read())
output_html = template.render(guides=guides, navbar_html=navbar_html)
with open(os.path.join("generated", "guides.html"), "w", encoding='utf-8') as generated_template:
with open(os.path.join("generated", "guides", "index.html"), "w", encoding='utf-8') as generated_template:
generated_template.write(output_html)
with open(os.path.join("generated", "guide.html"), "w", encoding='utf-8') as generated_template:
generated_template.write(output_html)