Registering a new plugin
- Fork the OctoPrint/plugins.octoprint.org repository on Github to your own account.
Clone the repository to your computer:
git clone firstname.lastname@example.org:<your account>/plugins.octoprint.org
Change into the just checked out folder
Create a new file in the
<your plugin's identifier>.mdfollowing this template:
--- layout: plugin id: your plugin's identifier title: your plugin's name description: short description of your plugin author: your name license: your plugin's license # today's date in format YYYY-MM-DD, e.g. date: 2015-06-22 homepage: your plugin's homepage source: your plugin's source repository archive: archive link to install your plugin via pip # set this to true if your plugin uses the dependency_links setup parameter to include # library versions not yet published on PyPi. SHOULD ONLY BE USED IF THERE IS NO OTHER OPTION! follow_dependency_links: false tags: - a list - of tags - that apply - to your plugin - (take a look at the existing plugins for what makes sense here) screenshots: - url: url of a screenshot alt: alt-text of a screenshot caption: caption of a screenshot - url: url of another screenshot alt: alt-text of another screenshot caption: caption of another screenshot - ... featuredimage: url of a featured image for your plugin compatibility: # list of compatible versions, for example 1.2.0. If left empty no specific version requirement will be assumed octoprint: - 1.2.0 # list of compatible operating systems, valid values are linux, windows, macos, leaving empty defaults to all os: - linux - windows - macos --- Longer description of your plugin, configuration examples etc. This part will be visible on the page at plugins.octoprint.org/plugin/<your plugin identifier>/
Note: If you used the OctoPrint cookiecutter template for your plugin as suggested in the Getting Started guide, it created a pre-filled file for you under
extras/<your plugin's identifier>.mdyou just have to complete. Then copy it to
_plugins/<your plugin's identifier>.
If you are unsure how things should look take a look at the existing plugins.
You may add screenshots to
assets/img/plugins/<your plugin's identifier>/(you’ll need to create this folder). You can then reference them as
/assets/img/plugins/<your plugin's identifier>/your_image.png(the leading
/here is important!).
The image you define as
featuredimagewill be included in the plugin repository’s RSS feed and plugins.json file. Future versions of the plugin manager might also display it within OctoPrint.
Important: Make sure
your plugin's identifieris the same you will register your plugin under with OctoPrint! So if you entered
plugin_identifierin cookiecutter make sure to use that exactly like that here too.
Ideally, you’ll test that your plugin gets listed correctly and the plugin page looks as expected. For this you’ll need to install Jekyll, which is what Github Pages and hence the plugin repository uses for rendering the static repository from the source files. Make sure you have at least Ruby 2.0 installed.
Github offers a nice setup guide that makes sure you have the exact versions of everything you need to run.
Note: If you want to install Jekyll on Windows, you might want to give this step-by-step guide a look. You might run into some issues with the
hitimesgem since at the time of writing this it hasn’t yet been adapted to the changes introduced in Ruby 2.2. If this is the case, take a look here.
After installing Jekyll, a simple
bundle exec jekyll serve
will start up a server listening on localhost:4000 serving the whole page. Make sure your plugin shows up there under “Recently added” and the other listing types and that it page looks as you expected.
Commit your changes:
git add _plugins/<your plugin's identifier>.md git add assets/img/plugins/<your plugin's identifier> git commit
Please use a meaningful commit message (e.g. “Added plugin <your plugin’s identifier”).
Push your changes to your fork on Github:
- Create a pull request on Github against the original repository.
- Once your pull request is merged, your plugin will be listed. Congratulations!