mirror of
https://github.com/pawroman/zola-theme-terminimal
synced 2024-11-25 05:50:17 +00:00
Automatically set link to RSS or ATOM feed
Set the <link > type to either `application/rss+xml` or `application/atom+xml` according to the `feed_filename` from `config.toml`.
This commit is contained in:
parent
9347dda144
commit
491d7d061e
1 changed files with 6 additions and 1 deletions
|
@ -12,7 +12,12 @@
|
|||
{{ head_macros::head(config=config) }}
|
||||
|
||||
{%- if config.generate_feed %}
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}">
|
||||
{%- if "rss" in config.feed_filename %}
|
||||
{% set feed_type = 'rss+xml' %}
|
||||
{%- else %}
|
||||
{% set feed_type = 'atom+xml' %}
|
||||
{% endif -%}
|
||||
<link rel="alternate" type="application/{{ feed_type }}" title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}">
|
||||
{% endif -%}
|
||||
|
||||
{%- if config.extra.favicon %}
|
||||
|
|
Loading…
Reference in a new issue