From 6b19540347eb953c60394cbdb153ff3f0e40e24f Mon Sep 17 00:00:00 2001 From: daudix Date: Sun, 29 Sep 2024 02:35:51 +0300 Subject: [PATCH] Improve feed logic --- templates/partials/card.html | 2 +- templates/partials/head.html | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/partials/card.html b/templates/partials/card.html index 22f9ba5..2de35b8 100644 --- a/templates/partials/card.html +++ b/templates/partials/card.html @@ -6,5 +6,5 @@ {%- set card = resize_image(path=page.colocated_path ~ page.extra.banner, width=1200, height=628, op="fill") -%} {{ card.url }} {%- else -%} - {{ get_url(path='card.png') }} + {{ get_url(path="card.png") }} {%- endif -%} diff --git a/templates/partials/head.html b/templates/partials/head.html index c6c6848..ff3d697 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -26,12 +26,16 @@ {%- include "partials/favicon.html" %} {%- if config.generate_feeds and config.feed_filenames %} - {%- for feed in config.feed_filenames %} - - {%- endfor %} - {%- elif config.generate_feeds and config.feed_filenames | length > 0 %} - - {%- endif %} + {% for feed in config.feed_filenames %} + {% if feed == "atom.xml" %} + + {% elif feed == "rss.xml" %} + + {% else %} + + {% endif %} + {% endfor %} + {% endif %} {%- include "partials/variables.html" %}