mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
add a warning for the users of the LESS_GENERATOR setting
This commit is contained in:
parent
b66a37ccb1
commit
1b20319074
1 changed files with 8 additions and 3 deletions
|
|
@ -132,7 +132,7 @@ def configure_settings(settings):
|
||||||
"""
|
"""
|
||||||
if not 'PATH' in settings or not os.path.isdir(settings['PATH']):
|
if not 'PATH' in settings or not os.path.isdir(settings['PATH']):
|
||||||
raise Exception('You need to specify a path containing the content'
|
raise Exception('You need to specify a path containing the content'
|
||||||
' (see pelican --help for more information)')
|
' (see pelican --help for more information)')
|
||||||
|
|
||||||
# find the theme in pelican.theme if the given one does not exists
|
# find the theme in pelican.theme if the given one does not exists
|
||||||
if not os.path.isdir(settings['THEME']):
|
if not os.path.isdir(settings['THEME']):
|
||||||
|
|
@ -142,7 +142,7 @@ def configure_settings(settings):
|
||||||
settings['THEME'] = theme_path
|
settings['THEME'] = theme_path
|
||||||
else:
|
else:
|
||||||
raise Exception("Impossible to find the theme %s"
|
raise Exception("Impossible to find the theme %s"
|
||||||
% settings['THEME'])
|
% settings['THEME'])
|
||||||
|
|
||||||
# if locales is not a list, make it one
|
# if locales is not a list, make it one
|
||||||
locales = settings['LOCALE']
|
locales = settings['LOCALE']
|
||||||
|
|
@ -185,12 +185,17 @@ def configure_settings(settings):
|
||||||
"http://docs.notmyidea.org/alexis/pelican/settings.html#timezone "
|
"http://docs.notmyidea.org/alexis/pelican/settings.html#timezone "
|
||||||
"for more information")
|
"for more information")
|
||||||
|
|
||||||
|
if 'LESS_GENERATOR' in settings:
|
||||||
|
logger.warn("The LESS_GENERATOR setting has been removed in favor "
|
||||||
|
"of WEBASSETS")
|
||||||
|
|
||||||
if 'WEBASSETS' in settings and settings['WEBASSETS'] is not False:
|
if 'WEBASSETS' in settings and settings['WEBASSETS'] is not False:
|
||||||
try:
|
try:
|
||||||
from webassets.ext.jinja2 import AssetsExtension
|
from webassets.ext.jinja2 import AssetsExtension
|
||||||
settings['JINJA_EXTENSIONS'].append(AssetsExtension)
|
settings['JINJA_EXTENSIONS'].append(AssetsExtension)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.warn("You must install the webassets module to use WEBASSETS.")
|
logger.warn("You must install the webassets module to use "
|
||||||
|
"WEBASSETS")
|
||||||
settings['WEBASSETS'] = False
|
settings['WEBASSETS'] = False
|
||||||
|
|
||||||
if 'OUTPUT_SOURCES_EXTENSION' in settings:
|
if 'OUTPUT_SOURCES_EXTENSION' in settings:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue