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] 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 %}