mirror of
https://github.com/pawroman/zola-theme-terminimal
synced 2024-11-25 14:00:17 +00:00
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
This commit is contained in:
parent
c620187811
commit
d0bb9da1d1
1 changed files with 11 additions and 7 deletions
|
@ -13,13 +13,17 @@
|
||||||
|
|
||||||
{%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%}
|
{%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%}
|
||||||
|
|
||||||
{%- if config.generate_feed %}
|
{%- if config.generate_feeds %}
|
||||||
{%- if "rss" in config.feed_filename %}
|
{%- for feed in config.feed_filenames %}
|
||||||
{% set feed_type = 'rss+xml' %}
|
{%- if feed is containing('atom') %}
|
||||||
{%- else %}
|
<link rel="alternate" type="application/atom+xml" title="{{ config.title }} Atom Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" />
|
||||||
{% set feed_type = 'atom+xml' %}
|
{%- endif %}
|
||||||
{% endif -%}
|
|
||||||
<link rel="alternate" type="application/{{ feed_type }}" title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}">
|
{%- if feed is containing('rss') %}
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="{{ config.title }} RSS Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" />
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{%- endfor %}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if config.extra.favicon %}
|
{%- if config.extra.favicon %}
|
||||||
|
|
Loading…
Reference in a new issue