diff options
author | Alan Pearce | 2023-06-20 18:28:42 +0200 |
---|---|---|
committer | Alan Pearce | 2023-06-20 18:28:42 +0200 |
commit | ea30ac77b60642d691a0508af5eb005186cf2851 (patch) | |
tree | da885a4ac645fd9b6c981422c0cc24324dea732e /templates/atom.xml | |
parent | 5d1e2d2018aba1eef5820a285f7e9004070972de (diff) | |
download | website-ea30ac77b60642d691a0508af5eb005186cf2851.tar.lz website-ea30ac77b60642d691a0508af5eb005186cf2851.tar.zst website-ea30ac77b60642d691a0508af5eb005186cf2851.zip |
Add styling to Atom feed
Diffstat (limited to 'templates/atom.xml')
-rw-r--r-- | templates/atom.xml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..3fd5dee --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="/feed-styles/" type="text/xsl"?> +<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 href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> + <link href=" + {%- if section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + "/> + <generator uri="https://www.getzola.org/">Zola</generator> + <updated>{{ last_updated | date(format="%+") }}</updated> + <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> + <author> + <name> + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + </name> + </author> + <link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/> + <id>{{ page.permalink | safe }}</id> + {% if page.summary %} + <summary type="html">{{ page.summary }}</summary> + {% else %} + <content type="html">{{ page.content }}</content> + {% endif %} + </entry> + {%- endfor %} +</feed> |