From 011e38d0175f69c8f902bfbc5676384f8b756eaf Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 26 May 2021 09:39:23 +0200 Subject: Include content in ATOM feeds --- Makefile | 14 +++++++------- templates/feed.xml | 2 +- templates/feed_entry.xml | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b4a58e8..b2fcd6c 100644 --- a/Makefile +++ b/Makefile @@ -56,21 +56,21 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ $(if $(PAGES_FILES),jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES) > "$@.pages",touch "$@.pages") pandoc \ -f markdown-citations \ - -t plain \ + -t html5 \ --no-highlight \ --template scripts/metadata_tpl.json \ --metadata namespace="$(NAMESPACE)" \ --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ --metadata-file "$@.pages" \ - -o "$@" "$<" -# pandoc \ + -o "$@.meta" "$<" + pandoc \ -f markdown-citations \ - -t markdown \ + -t html5 \ -o "$@.content" "$<" -# jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@" + jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@" rm "$@.pages" -# rm "$@.meta" -# rm "$@.content" + rm "$@.meta" + rm "$@.content" out/%.html: content/%.md .cache/meta/%.json $(CONTENT_TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua out/style.css | out $(info [MARK] $< -> $@) diff --git a/templates/feed.xml b/templates/feed.xml index 458202a..738b1ec 100644 --- a/templates/feed.xml +++ b/templates/feed.xml @@ -1,6 +1,6 @@ - $if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$ + <![CDATA[$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$]]> $last_update.rfc3339$ diff --git a/templates/feed_entry.xml b/templates/feed_entry.xml index c9d8af5..1c0302c 100644 --- a/templates/feed_entry.xml +++ b/templates/feed_entry.xml @@ -1,9 +1,10 @@ $if(it.last_update)$ $it.url.full$ - $it.title$ - + <![CDATA[$it.title$]]> + $it.last_update.rfc3339$ + $if(it.author)$ $for(it.author)$ -- cgit v1.2.3-70-g09d2