From 54e88beca21976a350ce6babd9fe10b07d658cf4 Mon Sep 17 00:00:00 2001 From: welpo Date: Fri, 23 Jun 2023 17:26:09 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20use=20page=20description=20?= =?UTF-8?q?as=20summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If neither page description or summary are available, only the post title will be shown. --- templates/atom.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 templates/atom.xml diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..c45dafd --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,50 @@ + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} {{ config.description }} {%- endif %} + + Zola + {{ last_updated | date(format="%+") + }} + {{ feed_url | safe }} {%- for page in pages %} + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ + page.updated | default(value=page.date) | date(format="%+") }} + + + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + + {{ + page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% elif page.description %} + {{ page.description }} + {% endif %} + + {%- endfor %} +