view bitsyblog/templates/atom.xml @ 133:ce478807848e default tip

py3
author Jeff Hammel <k0scist@gmail.com>
date Mon, 28 Dec 2020 21:18:19 +0000
parents 7e7fbdc64cc1
children
line wrap: on
line source

<?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>