-
Notifications
You must be signed in to change notification settings - Fork 12
Packaging Plugins & Themes
For now, you can package your theme or plugin using the NuGet Package Explorer.
- Start the NuGet Package Explorer(NPE) and select 'Create a new package'.
- Edit the Metadata and fill out
- the permanent Id for your package
- Version (please use Semantic Versioning)
- the Icon Url should be a 128x128 jpg/png thumbnail representing your theme
- your Author username, a Description and one or two appropriate Tags (use theme since it's a theme)
- From the menu, select Content to add a 'Content Folder' and...
- under the content folder, add a Themes folder.
- under Themes, add your custom theme folder (you can drag and drop it under the Themes folder you just created.) Attachments/Packaging-plugins-and-themes/example.png
- Save the Metadata (.nuspec) and the package (.nupkg) files
- Publish the theme package file at quarry.rockchms.com
- You will need your publish API key if you want to use the NuGet Package Explorer to publish directly to quarry.rockchms.com. Create an account on the quarry server and fetch your key from your profile page.
Attachments/Packaging-plugins-and-themes/s_Your-API-Key.png
NOTE: If you create a new version of your package that you intend on publishing, you MUST increment the version number as specified in the Semantic Versioning standard.
A plugin is simply a collection of one or more blocks with corresponding image, css, and JavaScript assets. There are two types of Plugins: one that has "data" (think SQL) associated with it and the other which does not. Data-less plugins can be shared today using Rock's Plugin Manager however plugins which need some persisted SQL data are not quite ready for use with Rock's Plugin Manager.
We're working on a convention that will provide you (the plugin developer) a mechanism to automatically execute your SQL on install and upgrade, but we're just not ready yet. The convention will probably include a "Migrations" folder with a
<version>subfolder for each version of the plugin. ExampleMigrations\1.0.0\up.sqlandMigrations\1.0.0\down.sqlWhere theup.sqlwill be called when upgrading to that version and thedown.sqlwill be called when removing that version.
As it turns out, creating a data-less Plugin package is nearly identical to creating a Rock Theme. The only real difference is the Icon Url would be a graphic representing your plugin (of course!) and instead of a Themes folder you will create a Plugins folder under the content folder from step 3 above. Under the Plugins folder you will create a custom folder to hold your blocks, assets, etc.