about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-12-28 23:30:34 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-12-28 23:30:34 +0700
commit3d1c6df4d779caf89590e7911e78c90c1473af4b (patch)
tree028768d92ab09556e307ab3dbce8eabb786d3914
parent89bb239365bdfdef8827251748e6a36d741fdf63 (diff)
downloadsite-3d1c6df4d779caf89590e7911e78c90c1473af4b.tar.gz
Patch footnotes in RSS feed as well
-rwxr-xr-x_libs/minify5
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')