From 54358ad5b3adda9ed61f06187dfc8c493123347c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 29 Mar 2019 11:24:39 +0100 Subject: [PATCH] oelican-theme: avoid using deprecated PAGINATED_DIRECT_TEMPLATES. --- doc/pelican/theme.rst | 4 ++-- pelican-theme/test/test_blog.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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'] }) -- 2.30.2