From 06a24a58e0569d5c1cd6af27a9ac875713f023fb Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 21 Apr 2022 18:02:20 +0300 Subject: feat: add RSS metadata --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d47b458..9f21e63 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # BENZIN Makefile WEBSITE_URL=https://example.com -WEBSITE_TITLE="Example Website" +WEBSITE_TITLE=Example Website CONVERT=pandoc --from=gfm+emoji --to=html --section-divs --shift-heading-level-by=1 PAGE_TEMPLATE=templates/page.html @@ -59,6 +59,12 @@ tmp/index.meta.title: $(RSS): $(BLOG_XML) $(RSS_TEMPLATE) @mkdir -p $(@D) sed "/<\/channel>/e cat $(BLOG_XML)" $(RSS_TEMPLATE) > $@ + sed -i \ + -e '//{' \ + -e 'a $(WEBSITE_TITLE)<\/title>' \ + -e "a <link>$(WEBSITE_URL)<\/link>" \ + -e "a <lastPubDate>$$(date --rfc-email)<\/lastPubDate>" \ + -e '}' $@ tmp/%.xml: tmp/%.content.html tmp/%.meta.title $(RSS_ITEM_TEMPLATE) @mkdir -p $(@D) @@ -86,7 +92,7 @@ tmp/emoji.sed: $(EMOJI_SOURCES) for emoji in $^; do\ basename=$$(basename $$emoji); \ name=$${basename%.*}; \ - echo "s|:$${name}:|<img src=\"/public/emoji/$${basename}\" alt=\"$${basename}-emoji\" height=\"$(EMOJI_SIZE)\" width=\"$(EMOJI_SIZE)\" style=\"$(EMOJI_STYLE)\">|g;" >> $@; \ + echo "s|:$${name}:|<img src=\"/public/emoji/$${basename}\" alt=\"$${name}-emoji\" height=\"$(EMOJI_SIZE)\" width=\"$(EMOJI_SIZE)\" style=\"$(EMOJI_STYLE)\">|g;" >> $@; \ done serve: $(HTML) -- cgit v1.2.3