From 3d1c6df4d779caf89590e7911e78c90c1473af4b Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 28 Dec 2021 23:30:34 +0700 Subject: Patch footnotes in RSS feed as well --- _libs/minify | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_libs/minify b/_libs/minify index 67634a3..8416d3b 100755 --- a/_libs/minify +++ b/_libs/minify @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Minify HTML and CSS, patch HTML and remove JS +# Minify HTML and CSS, patch HTML and RSS and remove JS # Copyright (C) 2021 Nguyễn Gia Phong # # This program is free software: you can redistribute it and/or modify @@ -36,4 +36,7 @@ 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()))) +for rss in site.rglob('feed.xml'): + print('Fixing up', rss) + rss.write_text(fix_footnotes(rss.read_text())) with suppress(FileNotFoundError): rmtree(site/'libs') -- cgit 1.4.1