Pelican plugin, used to auto-load my other plugins.
Project description
AutoLoader is a plugin for Pelican, a static site generator written in Python.
AutoLoader is designed to autoload the other Pelican plugins in my namespaces (minchin.pelican.plugins and minchin.pelican.readers). It can also be extended to autoload plugins in other namespaces, for example, to autoload the pelican.plugins namespace on versions of Pelican before 4.5 (when autoloading to those plugins was added to the Pelican core).
Installation
The easiest way to install AutoLoader is through the use of pip. This will also install the required dependencies automatically.
pip install minchin.pelican.plugins.autoloader
Further configuration will depend on the version of Pelican you are running. On version 4.5 or newer and you haven’t defined PLUGINS in your pelicanconf.py, nothing more in needed. On earlier versions of Pelican, or if you’ve defined PLUGINS, you’ll need to add the autoloader to your list of plugins in your pelicanconf.py file:
# pelicanconf.py
PLUGINS = [
# ...
'minchin.pelican.plugins.autoloader',
# ...
]
If you want to auto-load additional namespaces, you’ll need to define the AUTOLOADER_NAMESPACES variable in your pelicanconf.py file:
# pelicanconf.py
from minchin.pelican.plugins import autoloader
AUTOLOADER_NAMESPACES = autoloader.DEFAULT_NAMESPACE_LIST + [
"pelican.plugins",
# other namespaces
]
If you need to disallow auto-loading of certain plugins, you’ll need to define the AUTOLOADER_PLUGIN_BLACKLIST variable in your pelicanconf.py file. This only works when autoloading from defined namespaces. E.g.:
# pelicanconf.py
from minchin.pelican.plugins import autoloader
AUTOLOADER_PLUGIN_BLACKLIST = autoloader.DEFAULT_PLUGIN_BLACKLIST + [
"pelican.plugins.misbehaving_plugin",
# other plugins
]
Usage Notes
the plugins loaded by this plugin will not be shown when you run pelican-plugins
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file minchin.pelican.plugins.autoloader-1.2.1.tar.gz
.
File metadata
- Download URL: minchin.pelican.plugins.autoloader-1.2.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74a7e9bdac33461900b8bdb81c33423409e35c9c7cece193491abf7356d9cd95 |
|
MD5 | e5730fd0c67bfa5f9edefeb7e0a0e8e6 |
|
BLAKE2b-256 | b04f42a95cf7c37fd4b4f00df3872488294713d0a5e4827a4c8648fca1f35cf4 |
File details
Details for the file minchin.pelican.plugins.autoloader-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: minchin.pelican.plugins.autoloader-1.2.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d73cec6b28ab6d83356415f99b2d899e0737d7f8955f8c2938f363e442ee035a |
|
MD5 | 6e08338ed40158abb8d8438f99792ca1 |
|
BLAKE2b-256 | 0f5899693e37dc3abf7a0cd022090c666fca79c6a556eb921bed41717e7ad70c |