diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-28 23:30:34 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-28 23:30:34 +0700 |
commit | 3d1c6df4d779caf89590e7911e78c90c1473af4b (patch) | |
tree | 028768d92ab09556e307ab3dbce8eabb786d3914 | |
parent | 89bb239365bdfdef8827251748e6a36d741fdf63 (diff) | |
download | site-3d1c6df4d779caf89590e7911e78c90c1473af4b.tar.gz |
Patch footnotes in RSS feed as well
-rwxr-xr-x | _libs/minify | 5 |
1 files changed, 4 insertions, 1 deletions
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') |