Appearance
Building extensions
An extension is a folder with a manifest.json and the files it loads: HTML, JavaScript, CSS, images. Sorus installs, updates and removes it as one. It can bring:
| What it is | Manifest key | |
|---|---|---|
| Types | Kinds of object, with fields and templates | types, templates |
| Apps | Places in the sidebar, each with screens | apps (or screens) |
| Views | Ways to draw a saved view in Objects | views |
| Blocks | Ways to draw one object inside a page | blocks |
| Commands | Palette entries, with optional shortcuts | commands |
| Jobs | Scripts that run in the background | jobs |
An extension needs at least an app, a view, or a type. One that only brings types (Basics, mostly) is fine.
How an extension reaches Sorus
Every screen, view, block and job is a web page that talks to Sorus through the SDK. Sorus checks every call against what the extension was granted:
- its own types, which it may read and write;
- the uses its manifest asks for, such as reading pages or writing the calendar, which the person approves at install;
- the network hosts it lists, reached only through Sorus.
Third-party extensions run in a sandboxed frame with no network of its own. Extensions signed by Sorus may instead run as modules in Sorus's own window. Both get the same API, checked the same way.
Start here
- Your first extension: a type and a screen, in a few minutes.
- Developing from a folder: reloads, the console, packaging.
- The manifest: every key.
Sorus's own extensions, in the pages-apps repository, are good examples: Movies (types, an app with three screens, a block, a command), Basics (types, templates, an app, a view), Letterboxd (adds to Movies' types, a job, network), GitHub (a connection and a job).