Mercurial > piecrust2
changeset 31:8c15fc45d712
Make sure `.html` is part of auto-formats.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 19 Aug 2014 12:48:00 -0700 |
parents | 4bd840ae75cd |
children | 43091c9837bf |
files | piecrust/app.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/app.py Tue Aug 19 12:46:55 2014 -0700 +++ b/piecrust/app.py Tue Aug 19 12:48:00 2014 -0700 @@ -24,7 +24,7 @@ logger = logging.getLogger(__name__) -CACHE_VERSION = 10 +CACHE_VERSION = 11 class VariantNotFoundError(Exception): @@ -132,6 +132,9 @@ # Cache auto-format regexes. if not isinstance(sitec['auto_formats'], dict): raise ConfigurationError("The 'site/auto_formats' setting must be a dictionary.") + html_auto_format = sitec['auto_formats'] + if not html_auto_format: + sitec['auto_formats']['html'] = sitec['default_format'] cachec['auto_formats_re'] = r"\.(%s)$" % ( '|'.join( [re.escape(i) for i in list(sitec['auto_formats'].keys())]))