-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.html
51 lines (51 loc) · 1.74 KB
/
feed.html
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
50
51
---json
{
"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "FrostKiwi's Secrets",
"subtitle": "A collection of useful things I want to share with the world",
"language": "en",
"author": {
"name": "Wladislav Artsimovich",
"email": "[email protected]"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/feedStyle.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ site.url }}">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ permalink | absoluteUrl(site.url) }}" rel="self" />
<link href="{{ site.url }}" rel="alternate" />
<updated>{{ collections.post | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.post | reverse %}
{%- if not post.data.wip %}
{%- set absolutePostUrl = post.url | absoluteUrl(site.url) %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}" rel="alternate" />
<image>{{ post.data.image | absoluteUrl(site.url) }}</image>
<updated>{{ post.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<summary>{{ post.data.description }}</summary>
<content xml:lang="{{ metadata.language }}" type="html">
{{ post.data.description }}
<![CDATA[
<a href="{{ absolutePostUrl }}">
<img alt="thumbnail" src="{{ post.data.image | absoluteUrl(site.url) }}" />
</a>
]]>
</content>
<enclosure url="{{ post.data.image | absoluteUrl(site.url) }}" type="image/jpeg" />
</entry>
{%- endif %}
{%- endfor %}
</feed>