Merge remote-tracking branch 'origin/master' into fix-functional-tests

Conflicts:
	tests/support.py
This commit is contained in:
Bruno Binet 2012-07-05 01:22:31 +02:00
commit fe9388a7a4
47 changed files with 1711 additions and 184 deletions

View file

@ -68,6 +68,9 @@ _DEFAULT_CONFIG = {'PATH': '.',
'ARTICLE_PERMALINK_STRUCTURE': '',
'TYPOGRIFY': False,
'LESS_GENERATOR': False,
'SUMMARY_MAX_LENGTH': 50,
'WEBASSETS': False,
'PLUGINS': [],
}
@ -150,4 +153,12 @@ def configure_settings(settings, default_settings=None, filename=None):
"http://docs.notmyidea.org/alexis/pelican/settings.html#timezone "
"for more information")
if 'WEBASSETS' in settings and settings['WEBASSETS'] is not False:
try:
from webassets.ext.jinja2 import AssetsExtension
settings['JINJA_EXTENSIONS'].append(AssetsExtension)
except ImportError:
logger.warn("You must install the webassets module to use WEBASSETS.")
settings['WEBASSETS'] = False
return settings