From 770ef6ab748ec6070a7eb2eec8626dc5338d6fd5 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 5 Aug 2019 10:32:37 +0200 Subject: Switch to pelican4.1 --- .gitignore | 1 + pelicanconf.py | 5 +++-- theme/templates/base.html | 9 ++++----- theme/templates/categories.html | 2 +- theme/templates/category.html | 8 -------- theme/templates/tag.html | 4 ++-- 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 24ecff8..15d7067 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ cache/ *.pyc *.swp *.pid +*~ diff --git a/pelicanconf.py b/pelicanconf.py index 57a0940..9e4ca35 100755 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -23,8 +23,9 @@ FEED_DOMAIN = SITEURL FEED_RSS = 'feed' FEED_ATOM = 'feeds/atom.xml' FEED_MAX_ITEMS=5 -TAG_FEED_RSS = 'feeds/%s.xml' -TAG_FEED_ATOM = 'feeds/%s.atom' +TAG_FEED_RSS = 'feeds/{slug}.xml' +TAG_FEED_ATOM = 'feeds/{slug}.atom.xml' +CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml' DEFAULT_PAGINATION = FEED_MAX_ITEMS diff --git a/theme/templates/base.html b/theme/templates/base.html index 7024c58..6f44bb4 100755 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -8,19 +8,18 @@ {% if tag %} {% if TAG_FEED_ATOM %} - + {% endif %} {% if TAG_FEED_RSS %} - + {% endif %} {% endif %} - {% if category %} {% if CATEGORY_FEED_ATOM %} - + {% endif %} {% if CATEGORY_FEED_RSS %} - + {% endif %} {% endif %} diff --git a/theme/templates/categories.html b/theme/templates/categories.html index 0cd25d4..b63eef8 100755 --- a/theme/templates/categories.html +++ b/theme/templates/categories.html @@ -9,7 +9,7 @@
  • {{ category }} ({{ articles|count }}) {% if CATEGORY_FEED_RSS %} - + {% endif %}
  • {% endfor %} diff --git a/theme/templates/category.html b/theme/templates/category.html index 30284ca..f00be70 100755 --- a/theme/templates/category.html +++ b/theme/templates/category.html @@ -8,12 +8,4 @@ {{ abstract.abstract("h2") }} {% endif %} - {% if CATEGORY_FEED_RSS %} - - {% endif %} - - {% if CATEGORY_FEED_ATOM %} - - {% endif %} - {% endblock %} diff --git a/theme/templates/tag.html b/theme/templates/tag.html index 496d0e6..dbe2d82 100755 --- a/theme/templates/tag.html +++ b/theme/templates/tag.html @@ -9,11 +9,11 @@ {% endif %} {% if TAG_FEED_RSS %} - + {% endif %} {% if TAG_FEED_ATOM %} - + {% endif %} {% endblock %} -- cgit v1.2.3