summaryrefslogtreecommitdiffstats
path: root/templates/atom.xml
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-01-01 17:36:39 +0200
committerJan Tuomi <jan@jantuomi.fi>2026-01-02 16:21:05 +0200
commitc1856d1f3edbc4b32be5860233dede88db16a7bb (patch)
treeb3a5e2f600c0079bd04d7ab2bb459b4664ba66a1 /templates/atom.xml
parent6d7e34af89ef1038d213ff8ea325bb84d4a00d4a (diff)
Start migrating content
Diffstat (limited to 'templates/atom.xml')
-rw-r--r--templates/atom.xml68
1 files changed, 68 insertions, 0 deletions
diff --git a/templates/atom.xml b/templates/atom.xml
new file mode 100644
index 0000000..b1721ce
--- /dev/null
+++ b/templates/atom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
+ <title>{{ config.title }}
+ {%- if term %} - {{ term.name }}
+ {%- elif section.title %} - {{ section.title }}
+ {%- endif -%}
+ </title>
+ {%- if config.description %}
+ <subtitle>{{ config.description }}</subtitle>
+ {%- endif %}
+ <link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}" />
+ <link
+ rel="alternate"
+ type="text/html"
+ href="
+ {%- if section -%}
+ {{ section.permalink | escape_xml | safe }}
+ {%- else -%}
+ {{ config.base_url | escape_xml | safe }}
+ {%- endif -%}
+ "
+ />
+ <generator uri="https://www.getzola.org/">Zola</generator>
+ {% if last_updated is defined %}<updated
+ >{{ last_updated | date(format="%+") }}</updated>{% endif %}
+ <id>{{ feed_url | safe }}</id>
+ {%- for page in 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>