mirror of
https://github.com/grey-cat-1908/website.git
synced 2024-11-15 04:27:27 +03:00
disable minification for old blog posts
This commit is contained in:
parent
38623a5dd8
commit
688872a035
1 changed files with 11 additions and 8 deletions
9
build.py
9
build.py
|
@ -61,10 +61,13 @@ def generate_html_content(directory, filename, is_blog=False):
|
||||||
|
|
||||||
meta_data = parse_meta(meta)
|
meta_data = parse_meta(meta)
|
||||||
|
|
||||||
template_to_use = blog_template_text if is_blog else template_text
|
if is_blog:
|
||||||
|
return blog_template_text.replace("{{%CONTENT%}}", markdown_renderer(md_text))
|
||||||
|
.replace("{{%TITLE%}}", meta.get("title", ""))
|
||||||
|
.replace("{{%META%}}", meta_data)
|
||||||
|
else:
|
||||||
return minify_html.minify(
|
return minify_html.minify(
|
||||||
template_to_use.replace("{{%CONTENT%}}", markdown_renderer(md_text))
|
template_text.replace("{{%CONTENT%}}", markdown_renderer(md_text))
|
||||||
.replace("{{%TITLE%}}", meta.get("title", ""))
|
.replace("{{%TITLE%}}", meta.get("title", ""))
|
||||||
.replace("{{%META%}}", meta_data),
|
.replace("{{%META%}}", meta_data),
|
||||||
minify_js=True,
|
minify_js=True,
|
||||||
|
|
Loading…
Reference in a new issue