/
atom.xml
26 lines (26 loc) · 1.51 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
<?xml version="1.0" encoding="utf-8"?>
{% set date_format = "%Y-%m-%dT%H:%M:%SZ" %}
{% set title = handler.application.settings["blog_title"] %}
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en">
<title type="text">{{ escape(title) }}</title>
<id>{{ escape(handler.request.full_url()) }}</id>
<updated>{{ max(e.updated for e in entries).strftime(date_format) }}</updated>
<link rel="alternate" href="http://{{ handler.request.host + handler.request.path }}" title="{{ escape(title) }}" type="text/html"/>
<link rel="self" href="http://{{ handler.request.host + handler.request.path }}?format=atom" title="{{ escape(title) }}" type="application/atom+xml"/>
<link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
{% for entry in entries %}
<entry>
<id>tag:{{ handler.request.host }},{{ entry.published.strftime("%Y-%m-%d") }}:/e/{{ entry.slug }}</id>
<link href="http://{{ handler.request.host + "/e/" + entry.slug }}" rel="alternate" type="text/html"/>
<title type="text">{{ escape(entry.title) }}</title>
<updated>{{ entry.updated.strftime(date_format) }}</updated>
<published>{{ entry.published.strftime(date_format) }}</published>
<author><name>{{ escape(entry.author.nickname()) }}</name></author>
<content type="html">{{ escape(entry.body) }}</content>
{% for tag in entry.tags %}
<category term="{{ escape(tag) }}"></category>
{% end %}
{{ modules.MediaRSS(entry) }}
</entry>
{% end %}
</feed>