mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Text tweaks for "PLUGIN_PATH as list" feature
This commit is contained in:
parent
c386e29d0c
commit
f0802e8114
2 changed files with 6 additions and 6 deletions
|
|
@ -20,12 +20,12 @@ Alternatively, another method is to import them and add them to the list::
|
||||||
from package import myplugin
|
from package import myplugin
|
||||||
PLUGINS = [myplugin,]
|
PLUGINS = [myplugin,]
|
||||||
|
|
||||||
If your plugins are not in an importable path, you can specify a ``PLUGIN_PATH``
|
If your plugins are not in an importable path, you can specify a list of paths
|
||||||
in the settings. ``PLUGIN_PATH`` can be an absolute path or a path relative to
|
via the ``PLUGIN_PATH`` setting. As shown in the following example, paths in
|
||||||
the settings file::
|
the ``PLUGIN_PATH`` list can be absolute or relative to the settings file::
|
||||||
|
|
||||||
PLUGIN_PATH = ["list", "of", plugins path"]
|
PLUGIN_PATH = ["plugins", "/srv/pelican/plugins"]
|
||||||
PLUGINS = ["list", "of", "plugins"]
|
PLUGINS = ["assets", "liquid_tags", "sitemap"]
|
||||||
|
|
||||||
Where to find plugins
|
Where to find plugins
|
||||||
=====================
|
=====================
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ def read_settings(path=None, override=None):
|
||||||
local_settings[p] = absp
|
local_settings[p] = absp
|
||||||
|
|
||||||
if isinstance(local_settings['PLUGIN_PATH'], six.string_types):
|
if isinstance(local_settings['PLUGIN_PATH'], six.string_types):
|
||||||
logger.warning("Detected misconfiguration with %s setting ""(must be a list)" % 'PLUGIN_PATH')
|
logger.warning("Defining %s setting as string has been deprecated (should be a list)" % 'PLUGIN_PATH')
|
||||||
local_settings['PLUGIN_PATH'] = [local_settings['PLUGIN_PATH']]
|
local_settings['PLUGIN_PATH'] = [local_settings['PLUGIN_PATH']]
|
||||||
else:
|
else:
|
||||||
if 'PLUGIN_PATH' in local_settings and local_settings['PLUGIN_PATH'] is not None:
|
if 'PLUGIN_PATH' in local_settings and local_settings['PLUGIN_PATH'] is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue