Creating Plugins¶
Learn how to scaffold, register, and distribute a SmallBlock plugin.
Scaffold¶
smallblock plugin create myplugin
cd myplugin
Register¶
from smallblock.plugins import register_plugin
@register_plugin("myplugin")
def render(ctx):
return {"html": "<p>Hello from my plugin</p>"}
Distribute¶
Package with
pyproject.toml.Upload to an internal index or PyPI (if open-source).