Mercurial > piecrust2
diff piecrust/sources/posts.py @ 854:08e02c2a2a1a
core: Keep refactoring, this time to prepare for generator sources.
- Make a few APIs simpler.
- Content pipelines create their own jobs, so that generator sources can
keep aborting in `getContents`, but rely on their pipeline to generate
pages for baking.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 04 Jun 2017 23:34:28 -0700 |
parents | f070a4fc033c |
children | fddaf43424e2 |
line wrap: on
line diff
--- a/piecrust/sources/posts.py Sun May 21 00:06:59 2017 -0700 +++ b/piecrust/sources/posts.py Sun Jun 04 23:34:28 2017 -0700 @@ -21,6 +21,7 @@ SimpleAssetsSubDirMixin, IPreparingSource, IInteractiveSource): PATH_FORMAT = None + DEFAULT_PIPELINE_NAME = 'page' def __init__(self, app, name, config): super().__init__(app, name, config) @@ -122,10 +123,12 @@ day = int(m.group('day')) timestamp = datetime.date(year, month, day) metadata = { - 'year': year, - 'month': month, - 'day': day, - 'slug': m.group('slug'), + 'route_params': { + 'year': year, + 'month': month, + 'day': day, + 'slug': m.group('slug') + }, 'date': timestamp } return metadata