Skip to main content

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).

PyPI version number Changelog Supported Python version License Download Count

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

minchin_pelican_plugins_autoloader-1.2.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file minchin_pelican_plugins_autoloader-1.2.3.tar.gz.

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.3.tar.gz
Algorithm Hash digest
SHA256 541ec687217dfe44fc9c7097b32a8932ba788340cc3a33df9daf74c493678029
MD5 c540fbed7d73b80215b874ae7d310177
BLAKE2b-256 74c6ebcdf823359891cd5a032964dc8682fa4811d941e3d0d1005f690b7e59e7

See more details on using hashes here.

File details

Details for the file minchin_pelican_plugins_autoloader-1.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 739293751b94e914aee20d0a11a2f9da4847d5accdbacc915849f695ac0d7f4b
MD5 c623cc55d32488073e2d29f6a0884680
BLAKE2b-256 5d51a0218afb3281e3de057e57532258dfe3639d130b660858dd01e617510faf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page