-
Notifications
You must be signed in to change notification settings - Fork 1
/
feed.xml.njk
28 lines (28 loc) · 1.02 KB
/
feed.xml.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
permalink: "{{ site.feed.path }}"
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.meta.title }}</title>
<subtitle>{{ site.feed.subtitle }}</subtitle>
{% set absoluteUrl %}{{ site.feed.path | url | absoluteUrl(metadata.url) }}{% endset %}
<link href="{{ absoluteUrl }}" rel="self"/>
<link href="{{ site.siteurl }}"/>
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
<id>{{ site.feed.id }}</id>
<author>
<name>{{ site.feed.authorName }}</name>
<email>{{ site.feed.authorEmail }}</email>
</author>
{%- for post in collections.post | reverse %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>