Plugins

Almost every part of stag is a plugin. Plugins are invoked on certain events which occur during site generation (e.g. when stag finds a new file, when it starts processing input files etc.)

You can easily add custom plugins. Stag reads their path from the pluginspath setting in config.toml. By default it is plugins directory relative to the root directory of the project. You can read more about it in Plugins Programmer Manual.

Disabling Plugins

To disable a certain plugin, put int in plugins_disabled list in config.toml. Plugins are named after their file names, without an extension. For example:

config.toml
plugins_disabled = ["md", "macros"]

Additional Dependencies

If your plugin needs some additional dependencies, they must be installed separately. If Stag is installed in virtualenv, they should be installed to that virtualenv, for example:

$ path/to/venv/pip3 install <dependency>

or with a tool like pipx:

$ pipx inject stag-ssg <dependency>