{%- macro render_item(env, conf, entry) -%}
    <entry>
        <title>{{ entry.title | escape }}</title>
        <link rel="alternate" type="text/html" href="{{ conf.www_root + entry.permalink }}" />
        <id>tag:{{ env.netloc + env.path }},{{ entry.date.strftime('%Y-%m-%d') }}:{{ entry.permalink.rstrip('/') }}</id>
        <updated>{{ entry.date | utc }}</updated>
        {% for tag in entry.tags | tagify -%}
            <category term="{{ tag.title }}" />
        {% endfor %}
        <author>
            <name>{{ entry.author }}</name>
            <uri>{{ conf.www_root + '/' }}</uri>
            <email>{{ entry.email }}</email>
        </author>
        <content type="html">{{ entry.content | escape }}</content>
    </entry>
{%- endmacro -%}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ conf.lang }}">
    <author>
        <name>{{ conf.author }}</name>
        <uri>{{ conf.www_root + '/' }}</uri>
        <email>{{ conf.email }}</email>
    </author>
    <title>{{ conf.sitename | escape }}</title>
    <id>tag:{{ env.netloc + env.path }},2011-06-11:{{ env.route }}</id>
    <link rel="alternate" type="text/html" href="{{ conf.www_root + '/' }}" />
    <link rel="self" type="application/atom+xml" href="{{ conf.www_root+env.route }}" />
    <icon>{{ conf.www_root }}/favicon.ico</icon>
    <logo>{{ conf.www_root }}/feed-logo.png</logo>
    <updated>{{ env.updated | utc }}</updated>
    <generator uri="{{ env.url }}" version="{{ env.version }}">acrylamid</generator>
    {%- for entry in env.entrylist %}
        {{ render_item(env, conf, entry) }}
    {% endfor -%}
</feed>
