diff bitsyblog/templates/atom.xml @ 35:7e7fbdc64cc1

enable atom support, this brings us to 2.0
author k0s <k0scist@gmail.com>
date Sun, 01 Nov 2009 13:30:18 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bitsyblog/templates/atom.xml	Sun Nov 01 13:30:18 2009 -0500
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+      xmlns:py="http://genshi.edgewall.org/">
+
+  <py:choose test="bool(author)">
+    <py:when test="True">
+      <title>${author}'s blog</title>
+      <link href="${user_url(request, author)}"/>
+    </py:when>
+
+    <py:otherwise>
+      <title>${site_name} - atom</title>
+      <link href="${request.application_url}"/>
+    </py:otherwise>
+  </py:choose>
+
+  <updated>${date}</updated>
+
+  <entry py:for="entry in blog">
+    <title>${entry.title()}</title>
+    <link href="${permalink(request, entry)}"/>
+    <updated>${entry.date.isoformat()}</updated>
+    <summary>${entry.body}</summary>
+  </entry>
+</feed>