summaryrefslogtreecommitdiffstatshomepage
path: root/templates/feed.xml
blob: 8f7e3de2fbbcac65ae106f58d3ac0707c8b6b972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>{{ config.title }}
      {%- if term %} - {{ term.name }}
      {%- elif section.title %} - {{ section.title }}
      {%- endif -%}
    </title>
    <link>
      {%- if section -%}
        {{ section.permalink | escape_xml | safe }}
      {%- else -%}
        {{ config.base_url | escape_xml | safe }}
      {%- endif -%}
    </link>
    <description>{{ config.description }}</description>
    <generator>Zola</generator>
    <language>{{ lang }}</language>
    <atom:link href="{{ config.extra.feed_url | safe }}" rel="self" type="application/rss+xml"/>
    <lastBuildDate>{{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
    {%- for page in pages %}
      <item>
        <title>{{ page.title }}</title>
        <pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
        <author>{{ config.extra.email }} ({{ config.author }})</author>
        <link>{{ page.permalink | escape_xml | safe }}</link>
        <guid>{{ page.permalink | escape_xml | safe }}</guid>
        <description xml:base="{{ page.permalink | escape_xml | safe }}">
          {% if page.summary %}
            {{ page.summary }}
          {% else %}
            <![CDATA[{{ page.content | safe}}<p><a href="mailto:{{ config.extra.email }}?subject=Post Reply: {{ page.title }}">Reply to this post via email</a></p>]]>
          {% endif %}
        </description>
      </item>
    {%- endfor %}
  </channel>
</rss>