summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSylvain Gauthier <syg@pedantic.software>2021-03-15 18:51:16 +1100
committerSylvain Gauthier <syg@pedantic.software>2021-03-15 18:51:16 +1100
commit93e99588c6d95339387d27d3912c59bb2e7824b4 (patch)
treecf3f224f35fc626e08199dac50a47d90cb73ca8a /Makefile
parent455a6191f7d0f899c8e7eb24e60394c4de6e9546 (diff)
downloadbased.cooking-93e99588c6d95339387d27d3912c59bb2e7824b4.tar
based.cooking-93e99588c6d95339387d27d3912c59bb2e7824b4.tar.gz
based.cooking-93e99588c6d95339387d27d3912c59bb2e7824b4.tar.lz
based.cooking-93e99588c6d95339387d27d3912c59bb2e7824b4.tar.xz
based.cooking-93e99588c6d95339387d27d3912c59bb2e7824b4.zip
fix RSS titles, put whole recipe in description
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f63289154..13d363e61 100644
--- a/Makefile
+++ b/Makefile
@@ -168,11 +168,11 @@ blog/rss.xml: $(ARTICLES)
git log -n 1 --diff-filter=A --date="format:%s %a, %d %b %Y %H:%M:%S %z" --pretty=format:'%ad%n' -- "$$f"; \
done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE; do \
printf '<item>\n<title>%s</title>\n<link>%s</link>\n<guid>%s</guid>\n<pubDate>%s</pubDate>\n<description>%s</description>\n</item>\n' \
- "`head -n 1 $$FILE`" \
+ "`head -n 1 $$FILE | sed 's/^# //'`" \
"$(BLOG_URL_ROOT)/`basename $$FILE`.html" \
"$(BLOG_URL_ROOT)/`basename $$FILE`.html" \
"$$DATE" \
- "`sed -n '1d;/^$$/{2{d;b};q};p' < $$FILE`"; \
+ "`tail -n+3 < $$FILE`"; \
done >> $@
printf '</channel>\n</rss>\n' >> $@
@@ -184,13 +184,13 @@ blog/atom.xml: $(ARTICLES)
git log -n 1 --diff-filter=A --date="format:%s %Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad %aN%n' -- "$$f"; \
done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE AUTHOR; do \
printf '<entry>\n<title type="text">%s</title>\n<link rel="alternate" type="text/html" href="%s"/>\n<id>%s</id>\n<published>%s</published>\n<updated>%s</updated>\n<author><name>%s</name></author>\n<summary type="text">%s</summary>\n</entry>\n' \
- "`head -n 1 $$FILE`" \
+ "`head -n 1 $$FILE | sed 's/^# //'`" \
"$(BLOG_URL_ROOT)/`basename $$FILE`.html" \
"$(BLOG_URL_ROOT)/`basename $$FILE`.html" \
"$$DATE" \
"`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \
"$$AUTHOR" \
- "`sed -n '1d;/^$$/{2{d;b};q};p' < $$FILE`"; \
+ "`tail -n+3 $$FILE`"; \
done >> $@
printf '</feed>\n' >> $@