-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.twig
28 lines (26 loc) · 1.07 KB
/
feed.twig
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
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
{% set RFC822 = "D, d M Y H:i:s O" %}
<channel>
<title>{{ site_title | e }}</title>
<description>{{ pages.index.meta.description | e }}</description>
<link>{{ base_url }}/</link>
<atom:link href="{{ base_url ~ "/feed" }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ "now" | date(RFC822) }}</pubDate>
<lastBuildDate>{{ "now" | date(RFC822) }}</lastBuildDate>
<generator>Pico</generator>
{% for page in pages if page.id not in ['index','feed'] and not end %}
<item>
<title>{{ page.title | e }}</title>
<description>{{ page.id | content | e }}</description>
<pubDate>{{ page.date | date(RFC822) }}</pubDate>
<link>{{ page.url }}</link>
<guid isPermaLink="true">{{ page.url }}</guid>
{% for cat in page.meta.categories %}
<category>{{ cat | e }}</category>
{% endfor %}
</item>
{% if loop.index == 5 %}{% set end = true %}{% endif %}
{% endfor %}
</channel>
</rss>