From 24896a5f7751c47aaac69bac3ff9d4868644b99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar?= Date: Wed, 24 Jul 2024 19:33:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(header):=20render=20feed=20l?= =?UTF-8?q?inks=20based=20on=20config=20(#358)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/partials/header.html | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/templates/partials/header.html b/templates/partials/header.html index 5645edd43..b008643d2 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -14,9 +14,25 @@ {% endif %} - {# Feed #} - + {# Feeds #} + {% if config.generate_feeds | default(value=config.generate_feed) %} + {% if config.feed_filenames %} + {# Zola 0.19 and newer #} + {% for feed in config.feed_filenames %} + {% if feed == "atom.xml" %} + + {% elif feed == "rss.xml" %} + + {% else %} + + {% endif %} + {% endfor %} + {% else %} + {# Older Zola versions #} + {% set feed_url = config.feed_filename | default(value="atom.xml") %} + + {% endif %} + {% endif %} {# CSS #} {# Load subset of glyphs for header. Avoids flashing issue in Firefox #}