mirror of
https://github.com/pawroman/zola-theme-terminimal.git
synced 2025-01-09 20:21:06 +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
|
@ -5,6 +5,12 @@ title = "Zola Terminimal theme"
|
||||||
# Sass compilation is required
|
# Sass compilation is required
|
||||||
compile_sass = true
|
compile_sass = true
|
||||||
|
|
||||||
|
# The theme supports feeds (RSS and ATOM)
|
||||||
|
generate_feed = true
|
||||||
|
|
||||||
|
# Use `rss.xml` for RSS feeds and `atom.xml` for ATOM.
|
||||||
|
feed_filename = "atom.xml"
|
||||||
|
|
||||||
# Optional: enable tags
|
# Optional: enable tags
|
||||||
taxonomies = [
|
taxonomies = [
|
||||||
{name = "tags"}
|
{name = "tags"}
|
||||||
|
|
|
@ -12,7 +12,12 @@
|
||||||
{{ head_macros::head(config=config) }}
|
{{ head_macros::head(config=config) }}
|
||||||
|
|
||||||
{%- if config.generate_feed %}
|
{%- 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 -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if config.extra.favicon %}
|
{%- if config.extra.favicon %}
|
||||||
|
|
Loading…
Reference in a new issue