From: Vladimír Vondruš Date: Mon, 26 Nov 2018 12:15:51 +0000 (+0100) Subject: theme: use the {slug} instead of %s for feed URL templates. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=b098edab3953b0341ea5a564e16231a204e9e406;p=blog.git theme: use the {slug} instead of %s for feed URL templates. And thus dropping Pelican 3.7 support here as well. --- 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