From bc5b85043974e4af9c90962c2acde36b0e7de02a Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 28 Apr 2024 13:01:33 +0200 Subject: fix rss feed --- _config.yml | 2 ++ _layouts/index.html | 4 ++++ atom.xml | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 atom.xml diff --git a/_config.yml b/_config.yml index 7fc5267..f4870e1 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,6 @@ title: "Loek's Blog" +rss: + url: https://blog.pipeframe.xyz/atom.xml permalink: /post/:title exclude: - makefile diff --git a/_layouts/index.html b/_layouts/index.html index 2976df7..9f0f6d0 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -21,6 +21,10 @@
{{ content }} + {% if site.rss != nil %} +

An rss/atom feed of this blog is also available:

+
{{ site.rss.url }}
+ {% endif %}

Recent posts

diff --git a/atom.xml b/atom.xml new file mode 100644 index 0000000..f882360 --- /dev/null +++ b/atom.xml @@ -0,0 +1,28 @@ +--- +# empty frontmatter to force this file to be interpreted using liquid +--- +{% for post in site.pages %} + {% if post.layout == "index" %} + {% assign index_post = post %} + {% endif %} +{% endfor %} + + + + {{ index_post.title }} + {{ index_post.content | markdownify | xml_escape }} + en-us + {{ site.rss.url }} + + + {% for post in site.posts %} + + {{ post.title }} + {{ post.id }} + {{ post.url }} + {{ post.date | date_to_xmlschema }} + {{ post.content | markdownify | xml_escape }} + + {% endfor %} + + -- cgit v1.2.3