]> git.sur5r.net Git - i3/i3.github.io/blob - _templates/atom.mako
867e723980cd290d7a4067c7616511ed69e5e90e
[i3/i3.github.io] / _templates / atom.mako
1 <?xml version="1.0" encoding="UTF-8"?><% from datetime import datetime %>
2 <feed
3   xmlns="http://www.w3.org/2005/Atom"
4   xmlns:thr="http://purl.org/syndication/thread/1.0"
5   xml:lang="en"
6    >
7   <title type="text">${bf.config.blog.name}</title>
8   <subtitle type="text">${bf.config.blog.description}</subtitle>
9
10   <updated>${datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")}</updated>
11   <generator uri="http://blogofile.com/">Blogofile</generator>
12
13   <link rel="alternate" type="text/html" href="${bf.config.blog.url}" />
14   <id>${bf.config.blog.url}/atom.xml</id>
15   <link rel="self" type="application/atom+xml" href="${bf.config.blog.url}/feed/atom/" />
16 % for post in posts[:10]:
17   <entry>
18     <author>
19       <name>${post.author}</name>
20       <uri>${bf.config.blog.url}</uri>
21     </author>
22     <title type="html"><![CDATA[${post.title}]]></title>
23     <link rel="alternate" type="text/html" href="${post.permalink}" />
24     <id>${post.permalink}</id>
25     <updated>${post.updated.strftime("%Y-%m-%dT%H:%M:%SZ")}</updated>
26     <published>${post.date.strftime("%Y-%m-%dT%H:%M:%SZ")}</published>
27 % for category in post.categories:
28     <category scheme="${bf.config.blog.url}" term="${category}" />
29 % endfor
30     <summary type="html"><![CDATA[${post.title}]]></summary>
31     <content type="html" xml:base="${post.permalink}"><![CDATA[${post.content}]]></content>
32   </entry>
33 % endfor
34 </feed>