Relatude Help

Shipping a plugin

dist/index.js is the whole plugin. Serve it from the site, under wwwroot (such as wwwroot/cms-plugins/stock/index.js, served by app.UseStaticFiles()), or from another server that answers with Access-Control-Allow-Origin, since browsers load modules with CORS. Give its URL from the root (/cms-plugins/stock/index.js) or in full: the interface's page has a <base> that points at its own files, so a relative URL fails. Put the version in the URL (index.js?v=1.0.1) so browsers fetch the new build.

To load a plugin for every editor, list it as an interface plugin in the CMS settings (the admin UI's CMS tab, or relatude.settings/cms.json, chapter 13) with a new GUID as Id, or ship it in one of the site's modules (chapter 18):

{
  "InterfacePlugins": [
    { "Id": "8b0f3c5e-2d4a-4e1b-9c7f-5a6d1e2f3b40", "Name": "stock", "Url": "/cms-plugins/stock/index.js?v=1.0.1", "Enabled": true }
  ]
}

Settings → Plugins → Add plugin from URL adds one in this browser only, and ?plugin= loads one from your own computer for that page (A first plugin). Settings → Plugins lists every plugin with where it comes from and its state: Active; Failed, with the error; Incompatible, when its sdk does not match the interface's; Not licensed or Inactive, when its module is held back; or Disabled: turned off, replaced by a plugin of the same name, or ?safemode=1. Settings → Modules lists the site's modules.