cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

main: content/templates/feed.xml · raw

 1<?xml version="1.0" encoding="UTF-8" ?>
 2{#- The RSS feed at /feed.xml. A feed is read away from the site that served it, so
 3    every URL here is absolute — which is what `| absolute` needs [site] base_url for.
 4
 5    <description> carries each post's full rendered HTML — the collection sets
 6    `include_content` to ask for it. #}
 7<rss version="2.0"
 8     xmlns:content="http://purl.org/rss/1.0/modules/content/"
 9     xmlns:dc="http://purl.org/dc/elements/1.1/"
10     xmlns:atom="http://www.w3.org/2005/Atom">
11  <channel>
12    <title>{{ site.title }}</title>
13    <atom:link href="{{ page.url | absolute }}" rel="self" type="application/rss+xml" />
14    <link>{{ "index.html" | absolute | replace("index.html", "") }}</link>
15    <description>{{ site.description }}</description>
16    <language>{{ site.language }}</language>
17    <webMaster>hello@cleberg.net (Christian Cleberg)</webMaster>
18{%- for post in pages %}
19    <item>
20      <title>{{ post.title }}</title>
21      <link>{{ post.url | absolute }}</link>
22      <guid isPermaLink="true">{{ post.url | absolute }}</guid>
23      <author>hello@cleberg.net (Christian Cleberg)</author>
24{%- if post.date_iso %}
25      <pubDate>{{ post.date_iso | rfc822 }}</pubDate>
26{%- endif %}
27{%- for tag in post.tags %}
28      <category>{{ tag }}</category>
29{%- endfor %}
30      <description><![CDATA[{{ post.content | safe }}]]></description>
31    </item>
32{%- endfor %}
33  </channel>
34</rss>