mirror of
https://github.com/pawroman/zola-theme-terminimal.git
synced 2025-11-05 10:10:25 +01:00
Merge pull request #35 from heitorPB/autoconfigure-feed-type
Automatically set link to RSS or ATOM feed
This commit is contained in:
commit
6e91e642f6
2 changed files with 12 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…
Add table
Add a link
Reference in a new issue