-
Notifications
You must be signed in to change notification settings - Fork 23
/
feed.njk
32 lines (32 loc) · 1.17 KB
/
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
27
28
29
30
31
32
---
permalink: feed.xml
eleventyExcludeFromCollections: true
metadata:
title: plug11ty
url: https://plug11ty.com/
feedUrl: https://plug11ty.com/feed.xml
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<link href="{{ metadata.feedUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.all | rssLastUpdatedDate }}</updated>
<id>{{ metadata.url }}</id>
{%- if collections.plugins.length -%}
{%- for plugin in collections.plugins %}
{% set absolutePostUrl %}{{ plugin.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ plugin.data.title }}</title>
<summary>{{ plugin.data.description }}</summary>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ plugin.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<author>
<name>{{ plugin.data.maintainer.name }}</name>
</author>
<content type="html">{{ '<p>' + plugin.data.description + '</p>' + plugin.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
{%- endif -%}
</feed>