-
Notifications
You must be signed in to change notification settings - Fork 41
/
atom.xml
43 lines (40 loc) · 1.29 KB
/
atom.xml
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
<?xml version="1.0" encoding="utf-8"?>
{% if site.url %}
{% set site_url = "%s%s"|format(site.url, site.root) %}
{% else %}
{% set site_url = site.url %}
{% endif %}
<feed xmlns="http://www.w3.org/2005/Atom">
<generator uri="http://simiki.org/" version="{{ site.version }}">Simiki</generator>
<title>{{ site.title }}</title>
<link href="{{ site_url }}/" />
<link href="{{ site_url }}/atom.xml" rel="self" type="application/atom+xml" />
<updated>{{ site.time|rfc3339 }}</updated>
<id>{{ site_url }}</id>
<author>
<name>{{ site.author|e }}</name>
</author>
{% for f, page in pages.iteritems() %}
{% set uri = site_url ~ f|replace('content/', '/', 1)|replace('.md', '.html', 1) %}
<entry>
<id>{{ uri }}</id>
<title>{{ page.title|e }}</title>
<link href="{{ uri }}" />
<published>{{ page.date|rfc3339 }}</published>
{% if page.updated %}
<updated>{{ page.updated|rfc3339 }}</updated>
{% else %}
<updated>{{ page.date|rfc3339 }}</updated>
{% endif %}
{% if page.category %}
<category term="{{ page.category }}" />
{% endif %}
{% if page.content %}
<content type="html">{{ page.content|e }}</content>
{% endif %}
{% if page.summary %}
<summary>{{ page.summary|e }}</summary>
{% endif %}
</entry>
{% endfor %}
</feed>