Skip to content

Plugin registry

Eduardo Bouças edited this page Feb 20, 2020 · 2 revisions

Sourcebit's interactive setup process allows users to choose plugins from a public repository, which lives in GitHub.

It consists of an array of objects with the following properties:

  • module (String): The name of the plugin's npm module
    • Example: sourcebit-source-contentful
  • description (String): A human-friendly description of the plugin
    • Example: A Contentful source plugin for Sourcebit
  • author (String): The name/handle of the plugin's author
  • type (enum: source|target): The type of plugin
    • Example: source

Local plugin registry

You can create your own plugins.json file and tell the setup process to use it. This is useful when you're developing a plugin locally and you want it to appear on the list of available plugins without having to publish it to the official registry.

To use a local plugin registry, create a file with the structure above and start the setup process with the --plugins flag pointing to its path.

npx create-sourcebit --plugins=./my-plugins.json
✏️ Example
[
  {
    "module": "/Users/johndoe/sourcebit-source-contentful",
    "description": "A Contentful source plugin for Sourcebit",
    "author": "Stackbit",
    "type": "source"
  },
  {
    "module": "/Users/johndoe/sourcebit-target-jekyll",
    "description": "A Sourcebit plugin for Jekyll",
    "author": "Stackbit",
    "type": "target"
  }
]

Adding plugins to the registry

If you'd like your plugin to appear as an option within the interactive setup process, please add it to the registry file by submitting a pull request.

Clone this wiki locally