Use custom Atom template
This commit is contained in:
parent
f107f3eca1
commit
62c03ab9a6
@ -3,8 +3,9 @@ title = "em.0x45.cz"
|
||||
compile_sass = true
|
||||
build_search_index = false
|
||||
|
||||
generate_feed = false
|
||||
generate_feed = true
|
||||
feed_filename = "atom.xml"
|
||||
feed_limit = 10
|
||||
|
||||
taxonomies = [
|
||||
{name = "categories", feed = false}
|
||||
|
32
templates/atom.xml
Normal file
32
templates/atom.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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 href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
|
||||
<link href="
|
||||
{%- if section -%}
|
||||
{{ section.permalink | escape_xml | safe }}
|
||||
{%- else -%}
|
||||
{{ config.base_url | escape_xml | safe }}
|
||||
{%- endif -%}
|
||||
"/>
|
||||
<generator uri="https://www.getzola.org/">Zola</generator>
|
||||
<updated>{{ last_updated | date(format="%+") }}</updated>
|
||||
<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>
|
||||
<link href="{{ page.permalink | safe }}" type="text/html"/>
|
||||
<id>{{ page.permalink | safe }}</id>
|
||||
<summary type="html">{{ page.summary }}</summary>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
Loading…
Reference in New Issue
Block a user