theme/templates/atom.xml

b82ef632f9f27b74b39566f5f7b1e36bab75a241
cleberg.net/theme/templates/atom.xml history · blame · raw

42 lines · 1771 bytes

 1<?xml version="1.0" encoding="UTF-8" ?>
 2<rss version="2.0"
 3     xmlns:content="http://purl.org/rss/1.0/modules/content/"
 4     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
 5     xmlns:dc="http://purl.org/dc/elements/1.1/"
 6     xmlns:atom="http://www.w3.org/2005/Atom"
 7     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 8     xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
 9     xmlns:georss="http://www.georss.org/georss"
10     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
11     xmlns:media="http://search.yahoo.com/mrss/">
12  <channel>
13    <title>{{ site_name | default("Simple Blog") }}</title>
14    <atom:link
15      href="{{ url_for("rss") }}"
16      rel="self" type="application/rss+xml" />
17    <link>{{ url_for("index") }}</link>
18    <description><![CDATA[]]></description>
19    <language>en</language>
20    <pubDate>{{ posts | first | getattr("date") | strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
21    <lastBuildDate>{{ now() | strftime("%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
22    <generator>{{ meta.generator }}</generator>
23    <webMaster>{{ site_owner | default("hello@cleberg.net") }}</webMaster>
24    <image>
25      <url>{{ url_for("index") }}media/img/8bitme.png</url>
26      <title>Blog Author</title>
27      <link>{{ url_for("index") }}</link>
28    </image>
29
30    {% for post in posts %}
31    <item>
32      <title>{{ post.title }}</title>
33      <link>{{ url_for("blog", slug=post.slug) }}</link>
34      <author>{{ post.author|default("hello@cleberg.net") }}</author>
35      <guid isPermaLink="false">{{ url_for("blog", slug=post.slug) }}</guid>
36      <pubDate>{{ post.date|strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
37      <description><![CDATA[{{ post.html|safe }}]]></description>
38    </item>
39    {% endfor %}
40
41  </channel>
42</rss>