-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.njk
26 lines (26 loc) · 927 Bytes
/
feed.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
---
permalink: feed.xml
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.feed.description }}</subtitle>
<link href="{{ metadata.url }}/feed.xml" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.blog | rssLastUpdatedDate }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author}}</name>
<email>{{ metadata.mail }}</email>
</author>
{%- for blog in collections.blog %}
{% set absolutePostUrl %}{{ blog.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ blog.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ blog.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ blog.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>