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.4.tar.gz (8.7 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.4.tar.gz.

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.4.tar.gz
Algorithm Hash digest
SHA256 f4d6c636d1b119eb7ec1ef2b214e3db61562431126a220a0f1c6eb026c1dde0a
MD5 1684ab7b9588494b496ea72f18b77750
BLAKE2b-256 0b18a1c7fea55f41f4a5b712c16421eac73b282fada7ee7ad9f412008386d397

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for minchin_pelican_plugins_autoloader-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 53303030ece90092f3dcdb06c69ef4a8f7b2d2f91c4ce7d2de46118c1f99bfcd
MD5 4df0caede1789ba4884a749ecfb59973
BLAKE2b-256 0f9016f044d1b3d6da7d3b238e09972dbe4b61753784ca9645344c378e5bd0fc

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