pelican-granular-signals
Ensure that your Pelican plugin is called at the right time, every time.
Love Pelican but hate that your finalization plugin isn’t always called in the right order? Don’t let your plugin get lost in the shuffle of the finalized signal! pelican-granular-signals adds new finalization signals that guarantee your plugin is called at the right time, every time.
New Pelican signals
When pelican-granular-signals is installed, the following signals will be called immediately after the finalized signal:
sitemap
optimize
minify
compress
deploy
Each signal will be sent with the same argument that is sent to the finalized signal.
Connecting to granular signals
Your plugin must register with blinker directly. Here’s a complete example:
import blinker
import pelican.plugins.granular_signals
def register():
# This line is highly recommended so users
# don't have to update their configurations.
pelican.plugins.granular_signals.register()
# Connect your awesome plugin to a granular signal.
blinker.signal("deploy").connect(deploy_site)
# -----------------------------------------------------
# Put your awesome plugin code here.
import subprocess
def deploy_site(instance):
subprocess.run(instance.settings["DEPLOY_COMMAND"])
Helping users out
To make life easier for users, consider taking these two steps:
List pelican-granular-signals as a dependency so it will be automatically installed with your plugin.
When Pelican calls your plugin’s register() function, call pelican.plugins.granular_signals.register().
Pelican 4.5 introduced a new, automatic plugin loading feature and pelican-granular-signals is designed to work with this feature! Unfortunately, if a user specifies which plugins to load in their configuration file then automatic plugin loading will be disabled. It is therefore recommended that you call pelican.plugins.granular_signals.register() in your plugin’s register() function.
pelican.plugins.granular_signals.register() can be called multiple times without creating any problems.
Metadata
Release files for pelican-granular-signals 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pelican_granular_signals-1.2.0.tar.gz | 3.4 kB | Without provenance | Details for pelican_granular_signals-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pelican_granular_signals-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for pelican_granular_signals-1.2.0-py3-none-any.whl |
Total release size: 7.2 kB
Release files / pelican_granular_signals-1.2.0.tar.gz
| Download URL | pelican_granular_signals-1.2.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b087d491fe8499937c1b291c3457523d9267382e8e9632102367480948403e0
|
|
BLAKE2b-256 checksum How to use checksums |
ca4941dfe41f7196378861b5d8b96d7827ccaabca058320994983cd844ba4e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / pelican_granular_signals-1.2.0-py3-none-any.whl
| Download URL | pelican_granular_signals-1.2.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f45efc040481a33cf9acdeac7949eddad4923a67fe52b4668bab9f534ff7b72
|
|
BLAKE2b-256 checksum How to use checksums |
6b307d1e06d2736749b8dbc7cd8e34aced8a324d13b45f7ca48d74ca45e57693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for pelican-granular-signals 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.