From 5c0928922f00d6c6b227d43ffd0089cea2f7bc2d Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Mon, 11 Mar 2024 07:54:51 +0000 Subject: [PATCH] Add categories to atom feeds --- src/feeds/atom.njk | 4 ++++ src/feeds/tags/atom.njk | 1 + 2 files changed, 5 insertions(+) diff --git a/src/feeds/atom.njk b/src/feeds/atom.njk index 2b4031c..7f3d2da 100644 --- a/src/feeds/atom.njk +++ b/src/feeds/atom.njk @@ -25,6 +25,10 @@ {{ absolutePostUrl }} {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} {{ post.content | excerpt }} + {% set filteredTags = post.data.tags | except("posts") | except("draft") %} + {% for tag in filteredTags %} + + {% endfor %} {%- endfor %} \ No newline at end of file diff --git a/src/feeds/tags/atom.njk b/src/feeds/tags/atom.njk index ee37ad5..9887e65 100644 --- a/src/feeds/tags/atom.njk +++ b/src/feeds/tags/atom.njk @@ -18,6 +18,7 @@ eleventyComputed: {{ metadata.author.name }} {{ metadata.site.url }} + {%- for post in collections.posts | filterBy(tag) | reverse %} {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %}