From d0bb9da1d1b44035d56f0ea6892c9ce02c6d95b2 Mon Sep 17 00:00:00 2001 From: Heitor Pascoal de Bittencourt Date: Mon, 12 Aug 2024 16:36:10 -0300 Subject: [PATCH] templates/index: fix broken RSS/ATOM feed rel links Zola 0.19.0 changed the config options related to RSS/ATOM feed generation, allowing multiple feeds at once. This patch addresses this change and adds as many links in the HTML head as there are feeds. Fix #64 --- templates/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/index.html b/templates/index.html index 8b67c98..5f7a208 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,13 +13,17 @@ {%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%} - {%- if config.generate_feed %} - {%- if "rss" in config.feed_filename %} - {% set feed_type = 'rss+xml' %} - {%- else %} - {% set feed_type = 'atom+xml' %} - {% endif -%} - + {%- if config.generate_feeds %} + {%- for feed in config.feed_filenames %} + {%- if feed is containing('atom') %} + + {%- endif %} + + {%- if feed is containing('rss') %} + + {%- endif %} + + {%- endfor %} {% endif -%} {%- if config.extra.favicon %}