From b098edab3953b0341ea5a564e16231a204e9e406 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 26 Nov 2018 13:15:51 +0100 Subject: [PATCH] theme: use the {slug} instead of %s for feed URL templates. And thus dropping Pelican 3.7 support here as well. --- pelican-theme/templates/base.html | 4 ++-- pelican-theme/test/test_blog.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pelican-theme/templates/base.html b/pelican-theme/templates/base.html index 89ca00eb..9c6d1e67 100644 --- a/pelican-theme/templates/base.html +++ b/pelican-theme/templates/base.html @@ -15,9 +15,9 @@ {% endif %} {% if category %} {% if CATEGORY_FEED_ATOM_URL %} - + {% elif CATEGORY_FEED_ATOM %} - + {% endif %} {% endif %} diff --git a/pelican-theme/test/test_blog.py b/pelican-theme/test/test_blog.py index 907329d0..63dc102b 100644 --- a/pelican-theme/test/test_blog.py +++ b/pelican-theme/test/test_blog.py @@ -560,8 +560,8 @@ class Feeds(BlogTestCase): 'M_DISABLE_SOCIAL_META_TAGS': True, 'FEED_ALL_ATOM': 'atom.xml', 'FEED_ALL_ATOM_URL': 'feeds/atom.xml', - 'CATEGORY_FEED_ATOM': '%s.atom.xml', - 'CATEGORY_FEED_ATOM_URL': 'feeds/%s.atom.xml', + 'CATEGORY_FEED_ATOM': '{slug}.atom.xml', + 'CATEGORY_FEED_ATOM_URL': 'feeds/{slug}.atom.xml', }) # There should be just the first column @@ -576,7 +576,7 @@ class FeedsNoUrl(BlogTestCase): self.run_pelican({ 'M_DISABLE_SOCIAL_META_TAGS': True, 'FEED_ALL_ATOM': 'feeds/atom.xml', - 'CATEGORY_FEED_ATOM': 'feeds/%s.atom.xml', + 'CATEGORY_FEED_ATOM': 'feeds/{slug}.atom.xml', }) # The feed URLs should be the same as above -- 2.30.2