<%def name="render_item(env, conf, entry)">
    <item>
        <title>${ entry.title | h }</title>
        <link>${ conf.www_root + entry.permalink }</link>
        <description>${ entry.content | h }</description>
        <pubDate>${ entry.date | n, rfc822 }</pubDate>
        <guid isPermaLink="false">tag:${ env.netloc + env.path },${ entry.date.strftime('%Y-%m-%d') }:${ entry.permalink.rstrip('/') }</guid>
    </item>
</%def>\
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>${ conf.sitename | h }</title>
        <link>${ conf.www_root + '/' }</link>
        % if 'description' in conf:
        <description>${ conf.description }</description>
        % endif
        <language>${ conf.lang }</language>
        <pubDate>${ env.updated | n, rfc822 }</pubDate>
        <docs>${ conf.www_root + env.route }</docs>
        <generator>acrylamid ${ env.version }</generator>
        % if 'atom' in env.views:
            <atom:link href="${ conf.www_root + env.views['atom'].path }" rel="self" type="application/rss+xml" />
        % endif
        % for entry in env.entrylist:
            ${ render_item(env, conf, entry) }
        % endfor
    </channel>
</rss>