Skip to content

Commit

Permalink
Fix bug. Links Tag and category feeds are not generated correctly
Browse files Browse the repository at this point in the history
This is due to compatibility issue with Jinja2. See here for details

getpelican/pelican#2442 (comment)
  • Loading branch information
talha131 committed Feb 10, 2019
1 parent 269535f commit 0bf8059
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions templates/_includes/feeds_categories.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% if CATEGORY_FEED_ATOM %}
{% for category in categories %}
{% set cat_name = category[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(slug=cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category Atom Feed" />
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM.format(slug=cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category Atom Feed" />
{% endfor %}
{% endif %}
{% if CATEGORY_FEED_RSS %}
{% for category in categories %}
{% set cat_name = category[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(slug=cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category RSS Feed" />
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS.format(slug=cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category RSS Feed" />
{% endfor %}
{% endif %}

4 changes: 2 additions & 2 deletions templates/_includes/feeds_tags.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% if TAG_FEED_ATOM %}
{% for tag in tags %}
{% set tag_name = tag[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(slug=tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag Atom Feed" />
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM.format(slug=tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag Atom Feed" />
{% endfor %}
{% endif %}
{% if TAG_FEED_RSS %}
{% for tag in tags %}
{% set tag_name = tag[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(slug=tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag RSS Feed" />
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS.format(slug=tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag RSS Feed" />
{% endfor %}
{% endif %}

0 comments on commit 0bf8059

Please sign in to comment.