From 12503fd8211bbdf07d5211ad49645bfd0fef8a3e Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 13 Aug 2020 17:24:30 +0300 Subject: First changes for separate section feeds https://github.com/getzola/zola/pull/1128 --- config.toml | 3 +-- content/food/_index.md | 2 ++ content/weblog/_index.md | 2 ++ templates/feed.xml | 10 +++++----- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config.toml b/config.toml index 742f268..db8019c 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ title = "A website by Yaroslav de la Peña Smirnov" base_url = "https://www.yaroslavps.com/" -generate_feed = true +generate_feed = false feed_filename = "feed.xml" compile_sass = true @@ -11,7 +11,6 @@ highlight_code = true highlight_theme = "ayu-dark" taxonomies = [ - # {name = "sections", feed = true}, {name = "categories"}, ] diff --git a/content/food/_index.md b/content/food/_index.md index 9813b83..ecb844f 100644 --- a/content/food/_index.md +++ b/content/food/_index.md @@ -1,5 +1,7 @@ +++ +title = "A collection of recipes by Yaroslav de la Peña Smirnov" sort_by = "date" template = "weblog.html" paginate_by = 10 +generate_feed = true +++ diff --git a/content/weblog/_index.md b/content/weblog/_index.md index 9813b83..726b00b 100644 --- a/content/weblog/_index.md +++ b/content/weblog/_index.md @@ -1,5 +1,7 @@ +++ +title = "A weblog by Yaroslav de la Peña Smirnov" sort_by = "date" template = "weblog.html" paginate_by = 10 +generate_feed = true +++ diff --git a/templates/feed.xml b/templates/feed.xml index 66dd91c..ab5d340 100644 --- a/templates/feed.xml +++ b/templates/feed.xml @@ -1,7 +1,10 @@ - A weblog by Yaroslav de la Peña Smirnov - {%- if term %} - {{ term.name }} + <title> + {%- if section.title -%} + {{ section.title }} + {%- else -%} + A website by Yaroslav de la Peña Smirnov {%- endif -%} {%- if config.description %} @@ -13,9 +16,6 @@ {{ last_updated | date(format="%+") }} {{ feed_url | safe }} {%- for page in pages %} - {% if page.permalink is containing("/food/") %} - {% continue %} - {% endif %} {{ page.title }} {{ page.date | date(format="%+") }} -- cgit v1.2.3