Mercurial > piecrust2
diff piecrust/app.py @ 260:07b4b8484c0a
sources: Use `posts_*` and `items_*` settings more appropriately.
The `items_*` settings are the generic ones, and the `posts_*` are only used
with the default content model.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 23 Feb 2015 21:19:20 -0800 |
parents | e6ae65212c32 |
children | 12657039c436 |
line wrap: on
line diff
--- a/piecrust/app.py Sun Feb 22 22:03:54 2015 -0800 +++ b/piecrust/app.py Mon Feb 23 21:19:20 2015 -0800 @@ -173,14 +173,6 @@ if not isinstance(sitec['themes_sources'], list): sitec['themes_sources'] = [sitec['themes_sources']] - # Setup values for posts/items. - ipp = sitec.get('posts_per_page') - if ipp is not None: - sitec.setdefault('items_per_page', ipp) - pf = sitec.get('posts_filters') - if pf is not None: - sitec.setdefault('items_filters', pf) - # Figure out if we need to validate sources/routes, or auto-generate # them from simple blog settings. orig_sources = sitec.get('sources') @@ -197,8 +189,8 @@ g_post_url = sitec.get('post_url', '%year%/%month%/%day%/%slug%') g_tag_url = sitec.get('tag_url', 'tag/%tag%') g_category_url = sitec.get('category_url', '%category%') - g_posts_per_page = sitec.get('items_per_page', 5) - g_posts_filters = sitec.get('items_filters') + g_posts_per_page = sitec.get('posts_per_page', 5) + g_posts_filters = sitec.get('posts_filters') g_date_format = sitec.get('date_format', DEFAULT_DATE_FORMAT) # The normal pages and tags/categories.