Skip to content

Commit

Permalink
Zola 0.19.1 generate_feeds Support (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jieiku authored Dec 23, 2024
1 parent 1f32860 commit 3ec63e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ base_url = "https://getzola.github.io/after-dark/"
compile_sass = true
title = "after-dark theme"
description = "A robust, elegant dark theme"
generate_feed = true
generate_feeds = true

taxonomies = [
{name = "categories", feed = true},
Expand Down
17 changes: 13 additions & 4 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@

<title>{% block title %}{{ config.title }}{% endblock title %}</title>

{% if config.generate_feed %}
<link rel="alternate" type={% if config.feed_filename=="atom.xml" %}"application/atom+xml"{% else
%}"application/rss+xml"{% endif %} title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}">
{% endif %}
{%- if config.generate_feeds %}
{%- for feed in config.feed_filenames %}

{%- if feed is containing('atom') %}
<link rel="alternate" type="application/atom+xml" title="{{ config.title }} Atom Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" />
{%- endif %}

{%- 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 %}

{% block css %}
<link rel="stylesheet" href="{{ get_url(path='site.css', trailing_slash=false) | safe }}">
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "after-dark"
description = "A robust, elegant dark theme"
license = "MIT"
homepage = "https://github.com/getzola/after-dark"
min_version = "0.17.0"
min_version = "0.19.1"
demo = "https://getzola.github.io/after-dark/"

[extra]
Expand Down

0 comments on commit 3ec63e8

Please sign in to comment.