Menu

English,

EmDash

EmDash plugins: what exists and how to install them

Sandboxed or native, registry or npm: how EmDash plugins work, how they are installed, and what we ship inside our templates.

The west coast of Oahu from the air: a golden beach, the lagoon and the mountain at sunset.

Aloha Pixel4 min read

EmDash keeps its core small: content, media, users and the admin. Everything else goes through plugins. It is a sound design choice, and it is also the first surprise for anyone coming from WordPress: a fresh EmDash site cannot sell, take an appointment or send an abandoned cart reminder.

This article covers what an EmDash plugin is, the two ways to install one, and what we wrote ourselves for our client sites and then shipped in our EmDash templates. Facts about EmDash come from its documentation; facts about our plugins come from their code.

What an EmDash plugin can do

According to the documentation, a plugin can:

  • react to events: content saved, media uploaded, a comment moderated, a scheduled task;
  • keep its own data, in indexed collections and a key-value store;
  • add pages and widgets to the back office, with generated settings forms;
  • serve API routes under /_emdash/api/plugins/<id>/<route>;
  • call external services, only on the hosts it declares;
  • send email through the configured provider.

Two formats: sandboxed or native

This is the notion to understand before anything else.

  • Sandboxed. The plugin runs in a separate runtime, limited to the EmDash APIs it declares. An administrator can install it from the plugin registry. The documentation recommends this format by default.
  • Native. The plugin runs in the same process as the site, with full access. It is the only format that can ship React admin pages, Portable Text rendering components or HTML injected into public pages. It is installed from npm in astro.config.mjs and needs a deploy.

In practice, anything that needs real screens and real tables is native: a shop, a CRM, a calendar. Trusting a native plugin means trusting it as much as your own code.

How they are installed

A sandboxed plugin from the registry is installed from the back office, by an administrator. The registry launched with EmDash 1.0; a developer can also declare a sandboxed plugin in astro.config.mjs.

A native plugin follows the path of any dependency:

  1. add the package to the project;
  2. declare it in the EmDash integration in astro.config.mjs;
  3. rebuild and deploy the site;
  4. on first run, the plugin creates its tables and its screens appear in the menu.

Before installing a native plugin, ask three questions: which EmDash version it targets, who updates it when EmDash releases, and whether you can read its code.

What we ship, and why it is different

Our plugins are not on a registry: they live in the source code of each template, on the agency’s shared base. The live site lists them all on its Plugins page, each with a switch. Switched off, a plugin leaves the menu and its routes stop answering; its data stays, and switching it back on brings everything back.

With the Kailua 3 licence, all seven templates carry the site, shop, payment, shipping and marketing plugins: Shop, Stripe, PayPal, SumUp, Colissimo, Mondial Relay, AI Assistant, Security, Holo, Maintenance, Brevo, Loyalty, Gift cards, Promo codes, Licences and more. The Kailua 3 Pro licence adds, in the Kailua template, the CRM, online booking, Google and Microsoft 365 calendars, the company directory, subscriptions and Pennylane. The full list, one line per plugin, is on the EmDash plugins page.

That choice has a cost, and we carry it instead of the buyer: our screens are native, so they depend on the admin version. At each EmDash release we rework them; for 1.5.0 the work is described in EmDash 1.5.0: what the release changes for a theme.

In short

  • An EmDash plugin is sandboxed (registry, limited to its APIs) or native (npm, full access, deploy).
  • A shop, a CRM or a calendar are native plugins: choose them on their code and on who maintains them.
  • Ours ship inside the templates, are switched on from the Plugins page and follow each EmDash release.

To pick the template that carries the plugins you need, start with how to choose an EmDash template.

Keep reading

All articles