Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple feeds #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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