Mercurial > piecrust2
diff piecrust/data/linker.py @ 989:8adc27285d93
bake: Big pass on bake performance.
- Reduce the amount of data passed between processes.
- Make inter-process data simple objects to make it easier to test with
alternatives to pickle.
- Make sources have the basic requirement to be able to find a content item
from an item spec (path).
- Make Hoedown the default Markdown formatter.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 19 Nov 2017 14:29:17 -0800 |
parents | 45ad976712ec |
children | 7e4742a60d14 |
line wrap: on
line diff
--- a/piecrust/data/linker.py Fri Nov 03 23:14:56 2017 -0700 +++ b/piecrust/data/linker.py Sun Nov 19 14:29:17 2017 -0800 @@ -83,15 +83,17 @@ def forpath(self, path): # TODO: generalize this for sources that aren't file-system based. - item = self._source.findContent({'slug': path}) + item = self._source.findContentFromSpec({'slug': path}) return Linker(self._source, item) def childrenof(self, path): # TODO: generalize this for sources that aren't file-system based. src = self._source app = src.app - group = src.findGroup(path) + group = src.findContentFromSpec(path) if group is not None: + if not group.is_group: + raise Exception("'%s' is not a folder/group." % path) for i in src.getContents(group): if not i.is_group: ipage = app.getPage(src, i)