Mercurial > piecrust2
comparison piecrust/themes/base.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 | 14cca285f73b |
children | 40a40305c4e1 |
comparison
equal
deleted
inserted
replaced
988:f83ae0a5d793 | 989:8adc27285d93 |
---|---|
24 # theme from somehwere. | 24 # theme from somehwere. |
25 # TODO: make configs and themes load together to speed this up. | 25 # TODO: make configs and themes load together to speed this up. |
26 config_path = os.path.join(self.root_dir, CONFIG_PATH) | 26 config_path = os.path.join(self.root_dir, CONFIG_PATH) |
27 with open(config_path, 'r', encoding='utf8') as fp: | 27 with open(config_path, 'r', encoding='utf8') as fp: |
28 config = yaml.load(fp.read()) | 28 config = yaml.load(fp.read()) |
29 if not config: | |
30 return None | |
29 site_config = config.get('site', {}) | 31 site_config = config.get('site', {}) |
30 theme = site_config.get('theme', None) | 32 theme = site_config.get('theme', None) |
31 if theme is None: | 33 if theme is None: |
32 return None | 34 return None |
33 | 35 |