Skip to content

Custom repositories

Robert Isoski edited this page Jan 29, 2022 · 8 revisions

This page is deprecated. New documentation can be found here: https://github.com/robiso/wondercms/wiki/Custom-modules


Custom repositories are a way of adding, creating and sharing themes/plugins

The "Custom repository" field in the Settings->Themes or Settings->Plugins also enables you to install a theme (or plugin) that is not listed in the official WonderCMS repository.

Repositories can be used to serve your theme or plugin to other users. There are some examples which can be copied at the bottom of this document with some more helpful links.

How to create a custom repository

As a plugin or theme maintainer, a few files must be provided for the theme/plugin to be correctly installed for WonderCMS users.

  • Custom theme repository requirements

    Your repository must include the following files:

    • theme.php contains your theme and all WonderCMS theme elements
    • style.css must be inside a /css folder
    • version 3.0.0
    • summary short summary
    • preview.jpg compressed screenshot of your theme
  • Custom plugin repository requirements

    Your plugin repository must include the following files:

    • plugin-name.php contains your plugin code
      • IMPORTANT: plugin-name.php must be the same as the plugin folder name
    • version 3.0.0
    • summary short summary
    • preview.jpg compressed screenshot of your plugin

Install theme or plugin to your website

After finishing creating a custom theme/plugin repository, login to your website and open Settings -> Themes (or Plugins) and scroll to the bottom.

Paste your repository URL (example: https://github.com/yourUsername/yourThemeOrPlugin) and click "Add". Your theme/plugin should be now listed in the Settings -> Themes/Plugins section.

How to send a theme/plugin update to users or your website

  • Commit new changes to your theme/plugin files on Github.
  • Change the version file (eg: from 3.0.0 to 3.0.1) after you've confirmed everything is working.
  • Users will receive an "Update" notification in their Settings panel.
    • This will happen either after 24 hours OR when the users manually click the "Check for updates" button in the Settings panel.
  • When "Update" is clicked, all the users existing theme/plugin (from your changed files) will be overwritten with the latest ones from your theme/plugin repository.

How share your theme/plugin

Example projects to fork/clone

Troubleshooting

  • If you run into an error "Missing version file" when trying to add a custom repository, simply re-name your theme/plugin GitHub branch from "master" to "main" to fix the issue.
Clone this wiki locally