Fixed for Python 3.9

This commit is contained in:
Jim Shepich III 2026-02-02 13:49:04 -05:00
parent ab94ee0bab
commit aa6cae97fd
2 changed files with 4 additions and 3 deletions

View File

@ -123,7 +123,7 @@ def build_articles(
) )
with open(f'{site.web_root.rstrip('/')}/{article.path}', 'w') as f: with open(f"{site.web_root.rstrip('/')}/{article.path}", 'w') as f:
f.write(page_html) f.write(page_html)

View File

@ -83,14 +83,15 @@ def build_blog_archive(
}}}} }}}}
''') ''')
# For Python 3.9-friendliness.
newline = '\n'
# Generate the archive article. # Generate the archive article.
archive_html_article = format_html_template( archive_html_article = format_html_template(
template_selections['archive_article'], template_selections['archive_article'],
content = archive_html_list, content = archive_html_list,
tag_selector_options = ' '.join(tag_selector_options), tag_selector_options = ' '.join(tag_selector_options),
tag_selector_css_rules = f'<style>{"\n".join(tag_selector_css_rules)}</style>', tag_selector_css_rules = f'<style>{newline.join(tag_selector_css_rules)}</style>',
site = site, site = site,
**kwargs **kwargs
) )