Skip to content


Plugins are a way to extend the functionality of the render engine site.

Plugins are registered by using register_plugins

from render_engine import Site
from my_plugin import MyPlugin

app = Site()
app.register_plugins(MyPlugin, my_plugin={"foo":"bar"})

Alternatively, you can pass a list of plugins to the plugins attribute of the Site class.

Plugins are passed to collections and pages when the site.collection and methods are called.

from render_engine import Site, Collection, Page # plugins are ran on the page
class MyPage(Page):

@site.collection # plugins are ran on each page in the collection
class MyCollection(Collection):

>>> ['MyPlugin']

Single Page/Collection plugins

Plugins can be implemented on a case by case basis by adding them to the objects plugins attribute.

class MyPage(Page):
    plugins = [MyPlugin2]

>>> ['MyPlugin1', 'MyPlugin2']

Ignoring Plugins

Pages and collections can ignore plugins by passing a list of plugin names to the ignore_plugins attribute.

app.register_plugins(MyPlugin1, MyPlugin2)
class MyPage(Page):
    ignore_plugins = [MyPlugin1]

>>> ['MyPlugin2']

Implementing a plugin

Plugins are built with pluggy. See the pluggy documentation for more information.

Plugins use the entrypoints defined in render_engine.hookspecs. These allow plugins to be called at different points in the render engine lifecycle.