From 8d2823f83548820c205a18cec0606fb600630784 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 19 Jul 2021 07:30:33 +0100 Subject: [PATCH] Re-add RSS feed --- app/config/sculpin_site.yml | 6 +++--- source/rss.xml.twig | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 source/rss.xml.twig diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index 7f178ffd..c27bb100 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -25,9 +25,9 @@ menus: - title: Recommendations href: /recommendations - #- - # title: RSS feed - # href: \# + - + title: RSS feed + href: /rss.xml - title: Uses href: /uses diff --git a/source/rss.xml.twig b/source/rss.xml.twig new file mode 100644 index 00000000..c4ffae47 --- /dev/null +++ b/source/rss.xml.twig @@ -0,0 +1,34 @@ +--- +permalink: /rss.xml +use: + - posts +--- + + + <![CDATA[{{ site.title }}]]> + + + {{ site.calculated_date|date('c') }} + {{ site.url }}/ + {% if site.author or site.email %} + + {% if site.author %}{% endif %} + + {% endif %} + Sculpin + {% for post in data.posts|slice(0, 10) %} + + <![CDATA[{{ post.title }}]]> + + {{ post.date|date('c') }} + {{ site.url }}{{ post.url }} + {% if post.summary %} + + {% elseif post.blocks.excerpt %} + + {% else %} + + {% endif %} + + {% endfor %} +