🎨 refactor: restructure template

main
welpo 2 years ago
parent 54e88beca2
commit e3bd75e9e3
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -1,50 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
<title>{{ config.title }} <title>{{ config.title }}
{%- if term %} - {{ term.name }} {%- if term %} - {{ term.name }}
{%- elif section.title %} - {{ section.title }} {%- elif section.title %} - {{ section.title }}
{%- endif -%} {%- endif -%}
</title> </title>
{%- if config.description %} <subtitle>{{ config.description }}</subtitle> {%- endif %} <link {%- if config.description %}
href="{{ feed_url | safe }}" rel="self" type="application/atom+xml" /> <subtitle>{{ config.description }}</subtitle>
<link {%- endif %}
href=" <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
<link href="
{%- if section -%} {%- if section -%}
{{ section.permalink | escape_xml | safe }} {{ section.permalink | escape_xml | safe }}
{%- else -%} {%- else -%}
{{ config.base_url | escape_xml | safe }} {{ config.base_url | escape_xml | safe }}
{%- endif -%} {%- endif -%}
" /> "/>
<generator <generator uri="https://www.getzola.org/">Zola</generator>
uri="https://www.getzola.org/">Zola</generator> <updated>{{ last_updated | date(format="%+") }}</updated>
<updated>{{ last_updated | date(format="%+") <id>{{ feed_url | safe }}</id>
}}</updated> {%- for page in pages %}
<id>{{ feed_url | safe }}</id> {%- for page in pages %} <entry <entry xml:lang="{{ page.lang }}">
xml:lang="{{ page.lang }}">
<title>{{ page.title }}</title> <title>{{ page.title }}</title>
<published>{{ page.date | date(format="%+") }}</published> <published>{{ page.date | date(format="%+") }}</published>
<updated>{{ <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
page.updated | default(value=page.date) | date(format="%+") }}</updated>
<author> <author>
<name> <name>
{%- if page.authors -%} {%- if page.authors -%}
{{ page.authors[0] }} {{ page.authors[0] }}
{%- elif config.author -%} {%- elif config.author -%}
{{ config.author }} {{ config.author }}
{%- else -%} {%- else -%}
Unknown Unknown
{%- endif -%} {%- endif -%}
</name> </name>
</author> </author>
<link <link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/>
rel="alternate" href="{{ page.permalink | safe }}" type="text/html" /> <id>{{ page.permalink | safe }}</id>
<id>{{ {% if page.summary %}
page.permalink | safe }}</id> <summary type="html">{{ page.summary }}</summary>
{% if page.summary %} {% elif page.description %}
<summary type="html">{{ page.summary }}</summary> <summary type="html">{{ page.description }}</summary>
{% elif page.description %} {% endif %}
<summary type="html">{{ page.description }}</summary>
{% endif %}
</entry> </entry>
{%- endfor %} {%- endfor %}
</feed> </feed>

Loading…
Cancel
Save