From 62c03ab9a61979aee4e5fc3ea281cbeb5e3bc294 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sun, 24 Apr 2022 12:14:55 +0200 Subject: [PATCH] Use custom Atom template --- config.toml | 3 ++- templates/atom.xml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 templates/atom.xml diff --git a/config.toml b/config.toml index 0f849f8..1e40ec4 100644 --- a/config.toml +++ b/config.toml @@ -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} diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..a68b8ef --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,32 @@ + + + {{ 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="%+") }} + + {{ page.permalink | safe }} + {{ page.summary }} + + {%- endfor %} +