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.0.tar.gz (7.5 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.0.tar.gz.

File metadata

File hashes

Hashes for minchin.pelican.plugins.autoloader-1.2.0.tar.gz
Algorithm Hash digest
SHA256 371305f13ea4a280aebfcc26e86e427c9576d9918c682c8a71ebe866b07a8d17
MD5 1f0b67df0d250816419cefdc0095630f
BLAKE2b-256 9f5ed2233858fb1a282a9b61085e95dfe1c460ee67465156d2c1ec303304524d

See more details on using hashes here.

File details

Details for the file minchin.pelican.plugins.autoloader-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for minchin.pelican.plugins.autoloader-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3d6c2d79a8a525d8d2e5752d0d8ae27b79847cffa155bc5826ec8f544d6de5f
MD5 048a28d201f13122e98d09f9edeff2fe
BLAKE2b-256 58703e092da1acb996fe8d4b2f325f06c2fb04a512b8eb7b0c5410ae66200984

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