mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
git pull git://github.com/ametaireau/pelican.git
This commit is contained in:
commit
1d5228388b
23 changed files with 1269 additions and 42 deletions
|
|
@ -69,6 +69,8 @@ _DEFAULT_CONFIG = {'PATH': '.',
|
|||
'TYPOGRIFY': False,
|
||||
'LESS_GENERATOR': False,
|
||||
'SUMMARY_MAX_LENGTH': 50,
|
||||
'WEBASSETS': False,
|
||||
'PLUGINS': [],
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -151,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue