changeset 323:412537e91e45

pagination: Add support for `site/default_pagination_source`.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 Mar 2015 23:05:03 -0700
parents 7544c03b6bab
children 65e6d72f3877
files piecrust/data/builder.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/data/builder.py	Sun Mar 29 23:04:12 2015 -0700
+++ b/piecrust/data/builder.py	Sun Mar 29 23:05:03 2015 -0700
@@ -128,6 +128,8 @@
     app = page.app
     source_name = page.config.get('source') or page.config.get('blog')
     if source_name is None:
+        source_name = app.config.get('site/default_pagination_source')
+    if source_name is None:
         blog_names = app.config.get('site/blogs')
         if blog_names is not None:
             source_name = blog_names[0]