Files
website-11ty-hamburg.stefan…/src/feed.njk
2022-08-24 10:15:43 +02:00

36 lines
1.2 KiB
Plaintext

---
permalink: index.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:webfeeds="http://webfeeds.org/rss/1.0">
<title>{{ site.title }}</title>
<subtitle>{{ site.description }}</subtitle>
<link href="{{ site.url }}/index.xml" rel="self" type="application/atom+xml"/>
<link href="{{ site.url }}" rel="alternate" type="text/html"/>
{% if collections.districts %}
<updated>{{ collections.districts | rssLastUpdatedDate }}</updated>
{% endif %}
<id>{{ site.url }}/</id>
<author>
<name>{{ site.author }}</name>
</author>
{% include "feed-webfeeds.njk" %}
{%- for item in collections.districts | reverse -%}
{% set absolutePostUrl %}{{ item.url | url | absoluteUrl(site.url) }}{% endset %}
{%- if not item.data.draft -%}
<entry>
<title>{{ item.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ item.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">
<![CDATA[
{{ item.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | safe }}
]]>
</content>
</entry>
{%- endif -%}
{%- endfor -%}
</feed>