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.2.tar.gz (7.3 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.2.tar.gz.

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.2.tar.gz
Algorithm Hash digest
SHA256 1a7ed7e54e4e8b859b7a1a1fc986a2f54e4cd20659d2d5bf99c6157bd783366e
MD5 f7a0f99a3c98dda1a1a22300b55d1412
BLAKE2b-256 4fbb0365228e6f67238ae3a2fc5a07eda21c70c39e7473c251c46965519b79ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8cb868b464732af5699c58a6556795b3f56ff641f6ee568eebdc4da4ea807948
MD5 46c77897e0456270b4a887a6b397e2a4
BLAKE2b-256 ea2414b8b96bf144d683a07f98f71251f71e0e0950ae002784c05c05fa3998d3

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