refactor #1
@ -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)
|
||||||
|
|
||||||
|
|
||||||
@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user