mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update webassets plugin to allow user to pass configuration settings to Webassets through their settings file. Also removed language about DEBUG not compiling CSS since as of at least webassets 0.8 this is no longer an issue.
This commit is contained in:
parent
02f984f7ef
commit
a71465217b
2 changed files with 17 additions and 4 deletions
|
|
@ -36,6 +36,10 @@ def create_assets_env(generator):
|
|||
assets_src = os.path.join(generator.output_path, 'theme')
|
||||
generator.env.assets_environment = Environment(assets_src, assets_url)
|
||||
|
||||
if 'ASSET_CONFIG' in generator.settings:
|
||||
for item in generator.settings['ASSET_CONFIG']:
|
||||
generator.env.assets_environment.config[item[0]] = item[1]
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
if logging.getLevelName(logger.getEffectiveLevel()) == "DEBUG":
|
||||
generator.env.assets_environment.debug = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue