forked from juji-io/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.njk
49 lines (49 loc) · 1.76 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---json
{
"permalink": "all.feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "Juji - the easist DIY AI chatbot platform",
"subtitle": "News, guides, and insights from Juji, the easist DIY AI chatbot platform",
"url": "https://juji.io/",
"feedUrl": "https://juji.io/all.feed.xml",
"author": {
"name": "Juji Team",
"email": "[email protected]"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ metadata.feedUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.articles | reverse | rssLastUpdatedDate }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for article in collections.articles %}
{% set absolutePostUrl %}{{ article.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ article.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ article.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ article.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | utf8_xml }}</content>
</entry>
{%- endfor %}
{%- for page in collections.pages %}
{% set absolutePostUrl %}{{ page.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ page.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ page.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ page.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | utf8_xml }}</content>
</entry>
{%- endfor %}
</feed>