From 0205043946e5991275c7b3bcb6c7150033ebfe83 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sat, 3 Aug 2024 03:24:27 +0900 Subject: Stop minifying HTML and CSS Web server already compresses them. --- _libs/postprocess | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to '_libs') diff --git a/_libs/postprocess b/_libs/postprocess index 8416d3b..a031a9f 100755 --- a/_libs/postprocess +++ b/_libs/postprocess @@ -20,10 +20,8 @@ from contextlib import suppress from pathlib import Path from shutil import rmtree -from css_html_js_minify import html_minify, process_single_css_file - -FOOTNOTES_START = re.compile('(

)?\s*\s*(

)?') +FOOTNOTES_START = re.compile(r'(

)?\s*\s*(

)?') def fix_footnotes(html): @@ -32,10 +30,9 @@ def fix_footnotes(html): site = Path(__file__).parent.parent / '__site' -process_single_css_file(site/'css'/'style.css', overwrite=True) for html in site.rglob('*.html'): - print('Minifying and fixing up', html) - html.write_text(fix_footnotes(html_minify(html.read_text()))) + print('Fixing up', html) + html.write_text(fix_footnotes(html.read_text())) for rss in site.rglob('feed.xml'): print('Fixing up', rss) rss.write_text(fix_footnotes(rss.read_text())) -- cgit 1.4.1