Skip to content

Commit

Permalink
Add support for multiple feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxter184 committed Jun 28, 2024
1 parent 37b4516 commit 334ec4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ 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
feed_filenames = ["atom.xml", "rss.xml"]

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

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

{% block css %}
Expand Down

0 comments on commit 334ec4a

Please sign in to comment.