diff --git a/docs/writing_plugins.rst b/docs/writing_plugins.rst index d8ede5f3..14448cce 100644 --- a/docs/writing_plugins.rst +++ b/docs/writing_plugins.rst @@ -30,6 +30,19 @@ Now you can navigate to http://localhost:8001/mydb and run this SQL:: To see the output of your plugin. +Writing an installable plugin +----------------------------- + +Plugins that can be installed should be written as Python packages using a ``setup.py`` file. + +The easiest way to start writing one an installable plugin is to use the `datasette-plugin `__ cookiecutter template. This creates a new plugin structure for you complete with an example test and GitHub Actions workflows for testing and publishing your plugin. + +`Install cookiecutter `__ and then run this command to start building a plugin using the template:: + + cookiecutter gh:simonw/datasette-plugin + +Read `a cookiecutter template for writing Datasette plugins `__ for more information about this template. + Packaging a plugin ------------------