summaryrefslogtreecommitdiffstats
path: root/templates_gmi/atom.xml
blob: b1721cee9af2c3403066c7f5bad7e0843569e845 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
    <title>{{ config.title }}
    {%- if term %} - {{ term.name }}
    {%- elif section.title %} - {{ section.title }}
    {%- endif -%}
    </title>
    {%- if config.description %}
    <subtitle>{{ config.description }}</subtitle>
    {%- endif %}
    <link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}" />
    <link
        rel="alternate"
        type="text/html"
        href="
      {%- if section -%}
        {{ section.permalink | escape_xml | safe }}
      {%- else -%}
        {{ config.base_url | escape_xml | safe }}
      {%- endif -%}
    "
    />
    <generator uri="https://www.getzola.org/">Zola</generator>
    {% if last_updated is defined %}<updated
    >{{ last_updated | date(format="%+") }}</updated>{% endif %}
    <id>{{ feed_url | safe }}</id>
    {%- for page in pages %}
    <entry xml:lang="{{ page.lang }}">
        <title>{{ page.title }}</title>
        <published>{{ page.date | date(format="%+") }}</published>
        <updated
        >{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
        {% for author in page.authors %}
        <author>
          <name>
            {{ author }}
          </name>
        </author>
        {% else %}
        <author>
          <name>
            {%- if config.author -%}
              {{ config.author }}
            {%- else -%}
              Unknown
            {%- endif -%}
          </name>
        </author>
        {% endfor %}
        <link
            rel="alternate"
            type="text/html"
            href="{{ page.permalink | safe }}"
        />
        <id>{{ page.permalink | safe }}</id>
        {% if page.summary %}
        <summary type="html">{{ page.summary }}</summary>
        {% else %}
        <content
            type="html"
            xml:base="{{ page.permalink | escape_xml | safe }}"
        >
        {{ page.content }}
        </content>
        {% endif %}
    </entry>
    {%- endfor %}
</feed>