From: Vladimír Vondruš Date: Fri, 29 Mar 2019 10:24:39 +0000 (+0100) Subject: oelican-theme: avoid using deprecated PAGINATED_DIRECT_TEMPLATES. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=54358ad5b3adda9ed61f06187dfc8c493123347c;p=blog.git oelican-theme: avoid using deprecated PAGINATED_DIRECT_TEMPLATES. --- diff --git a/doc/pelican/theme.rst b/doc/pelican/theme.rst index 36c5de5a..54aad04d 100644 --- a/doc/pelican/theme.rst +++ b/doc/pelican/theme.rst @@ -790,8 +790,8 @@ pagination for the archives, as that's not enabled by default: # Defaults to ['index', 'categories', 'authors', 'archives'] DIRECT_TEMPLATES = ['archives'] - # Defaults to ['index'] - PAGINATED_DIRECT_TEMPLATES = ['archives'] + # Defaults to {'index': None, 'tag': None, 'category': None, 'author': None} + PAGINATED_TEMPLATES = {'archives': None, 'tag': None, 'category': None, 'author': None} .. note-warning:: diff --git a/pelican-theme/test/test_blog.py b/pelican-theme/test/test_blog.py index f9d2dd16..605ee802 100644 --- a/pelican-theme/test/test_blog.py +++ b/pelican-theme/test/test_blog.py @@ -130,7 +130,7 @@ class Pagination(BlogTestCase): [(1, 'index.html', '{name}.html'), (2, 'index{number}.html', '{name}{number}.html')], 'DIRECT_TEMPLATES': ['index', 'archives'], - 'PAGINATED_DIRECT_TEMPLATES': ['index', 'archives'], + 'PAGINATED_TEMPLATES': {'index': None, 'archives': None, 'tag': None, 'category': None, 'author': None}, # verify that og:url doesn't take pagination into account 'M_DISABLE_SOCIAL_META_TAGS': False @@ -171,7 +171,7 @@ class PaginationDisabled(BlogTestCase): def test(self): self.run_pelican({ 'DEFAULT_PAGINATION': 1, - 'PAGINATED_DIRECT_TEMPLATES': [] + 'PAGINATED_TEMPLATES': {'tag': None, 'category': None, 'author': None} }) # Nothing is paginated @@ -462,7 +462,7 @@ class HtmlEscape(BlogTestCase): [(1, 'index.html?and&in&url=""', '{name}.html'), (2, 'index{number}.html?and&in&url=""', '{name}{number}.html')], 'DIRECT_TEMPLATES': ['index', 'archives'], - 'PAGINATED_DIRECT_TEMPLATES': ['index', 'archives'], + 'PAGINATED_TEMPLATES': {'index': None, 'archives': None, 'tag': None, 'category': None, 'author': None}, 'FORMATTED_FIELDS': ['summary', 'description'] })