{%- macro render_item(env, conf, entry) -%}
    <item>
        <title>{{ entry.title | escape }}</title>
        <link>{{ conf.www_root + entry.permalink }}</link>
        <description>{{ entry.content | escape }}</description>
        <pubDate>{{ entry.date | rfc822 }}</pubDate>
        <guid isPermaLink="false">tag:{{ env.netloc + env.path }},{{ entry.date.strftime('%Y-%m-%d') }}:{{ entry.permalink.rstrip('/') }}</guid>
    </item>
{%- endmacro -%}
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>{{ conf.sitename | escape }}</title>
        <link>{{ conf.www_root + '/' }}</link>
        <description>{{ conf.description }}</description>
        <language>{{ conf.lang }}</language>
        <pubDate>{{ env.updated | 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 + conf.views.atom.path }}" rel="self" type="application/rss+xml" />
        {% endif %}
        {%- for entry in env.entrylist %}
            {{ render_item(env, conf, entry) }}
        {% endfor -%}
    </channel>
</rss>