From 491d7d061ec029c9fdb0ffa9fbdf67164460a3ca Mon Sep 17 00:00:00 2001 From: Heitor Pascoal de Bittencourt Date: Thu, 4 May 2023 12:57:57 -0300 Subject: [PATCH 1/2] Automatically set link to RSS or ATOM feed Set the type to either `application/rss+xml` or `application/atom+xml` according to the `feed_filename` from `config.toml`. --- templates/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 42366b5..1ee2a77 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,7 +12,12 @@ {{ head_macros::head(config=config) }} {%- if config.generate_feed %} - + {%- if "rss" in config.feed_filename %} + {% set feed_type = 'rss+xml' %} + {%- else %} + {% set feed_type = 'atom+xml' %} + {% endif -%} + {% endif -%} {%- if config.extra.favicon %} From a5e119ec7ba92c01502c9fbd8036550f1f2f4552 Mon Sep 17 00:00:00 2001 From: Heitor Pascoal de Bittencourt Date: Thu, 22 Jun 2023 13:10:37 -0300 Subject: [PATCH 2/2] Add note about the feeds in the theme's config.toml --- config.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.toml b/config.toml index 7af0f3d..2a5b87d 100644 --- a/config.toml +++ b/config.toml @@ -5,6 +5,12 @@ title = "Zola Terminimal theme" # Sass compilation is required compile_sass = true +# The theme supports feeds (RSS and ATOM) +generate_feed = true + +# Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. +feed_filename = "atom.xml" + # Optional: enable tags taxonomies = [ {name = "tags"}