Skip to content

Plugins

Plugins extend EmDash through a defined extension surface. They can react to content lifecycle events, store their own data, expose settings to administrators, add pages to the admin panel, and serve API routes.

React to events

Run code on content saves, media uploads, comment moderation, scheduled tasks, and plugin lifecycle events.

Store data

Persist plugin-specific records in indexed collections, plus a per-plugin key-value store for settings and state.

Add admin pages

Contribute pages and dashboard widgets to the admin panel, with auto-generated settings forms.

Serve API routes

Expose endpoints under /_emdash/api/plugins/<id>/<route> for the admin UI or external integrations.

Call external APIs

Make HTTP requests with declared host allowlists.

Send email

Send transactional email through whichever provider is configured.

EmDash plugins come in two formats:

  • Sandboxed plugins run in a separate runtime managed by a configured sandbox runner. Administrators can install them from the plugin registry, and site developers can register them under sandboxed: [] in astro.config.mjs. The runner limits plugins to their declared EmDash APIs and applies the resource limits supported by the platform.
  • Native plugins run in the same process as your Astro site. They have full access to the runtime, can ship React admin pages and Portable Text rendering components, and inject HTML into public pages. They install from npm through astro.config.mjs and require a deploy.

Prefer a sandboxed plugin unless it needs React admin pages, Portable Text rendering components, page fragments, or direct access to the site process. If you’re building a plugin, see Choosing a plugin format.

If you want to install or configure plugins on your site:

If you want to build a plugin: