summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKatherine Peeters <katherine.peeters@leagueh.xyz>2020-11-19 22:26:29 -0500
committerKatherine Peeters <katherine.peeters@leagueh.xyz>2020-11-19 22:26:29 -0500
commit95fdfde6c9004b8cdb25b2b57bc2f8224abbae55 (patch)
treeee2843f8363eddd690a77992b541dc1d1d5879a3 /Makefile
parent8c35a80f826f881db25d3f0c4dcfe253065109b5 (diff)
downloadloh-website-95fdfde6c9004b8cdb25b2b57bc2f8224abbae55.tar.gz
Read RSS feeds as Markdown instead
Remind me to fix the main site feed at some point
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8ec7bf5..677d1b9 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,11 @@ site/favicon.ico: site/icon.svg
%.xml: %.rss %.rss.header.xml %.rss.item_header.xml rss_item_footer.xml rss_footer.xml
cat $<.header.xml > $@
- for i in $(shell ls -r $</*.xml | head -n 15) ; do \
+ for i in $(shell ls -r $</*.md | head -n 15) ; do \
cat $<.item_header.xml >> $@; \
+ echo "<title>`sed -n '/^#.*/p' $$i | cut -c 3-`</title>" >> $@; \
echo "<pubDate>`date -r $$i '+%a, %d %b %Y'`</pubDate>" >> $@; \
- cat $$i >> $@; \
+ echo "<description>`sed '/^#.*/d' $${i%.md}.html | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'`</description>" >> $@; \
cat rss_item_footer.xml >> $@; \
done
cat rss_footer.xml >> $@