aboutsummaryrefslogtreecommitdiff
path: root/templates/feed.xml
diff options
context:
space:
mode:
Diffstat (limited to 'templates/feed.xml')
-rw-r--r--templates/feed.xml39
1 files changed, 39 insertions, 0 deletions
diff --git a/templates/feed.xml b/templates/feed.xml
new file mode 100644
index 0000000..2ac0851
--- /dev/null
+++ b/templates/feed.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
+ <title>{{ config.title }}</title>
+ <link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}"/>
+ <updated>{{ last_updated | date(format="%+") }}</updated>
+ <id>{{ feed_url | safe }}</id>
+ {%- set blog = get_section(path="blog/_index.md") -%}
+ {%- for page in blog.pages %}
+ <entry xml:lang="{{ page.lang }}">
+ <title>{{ page.title }}</title>
+ <published>{{ page.date | date(format="%+") }}</published>
+ <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
+ {% for author in page.authors %}
+ <author>
+ <name>
+ {{ author }}
+ </name>
+ </author>
+ {% else %}
+ <author>
+ <name>
+ {%- if config.author -%}
+ {{ config.author }}
+ {%- else -%}
+ Unknown
+ {%- endif -%}
+ </name>
+ </author>
+ {% endfor %}
+ <link rel="alternate" type="text/html" href="{{ page.permalink | safe }}"/>
+ <id>{{ page.permalink | safe }}</id>
+ {% if page.summary %}
+ <summary type="html">{{ page.summary }}</summary>
+ {% else %}
+ <content type="html" xml:base="{{ page.permalink | escape_xml | safe }}">{{ page.content }}</content>
+ {% endif %}
+ </entry>
+ {%- endfor %}
+</feed>