EmDash: Cloudflare's open-source CMS built on Astro
What EmDash is, what it can do, how to try it, and how it fits with Astro, D1 and R2. A plain guide for developers coming from WordPress.
What EmDash is, what it can do, how to try it, and how it fits with Astro, D1 and R2. A plain guide for developers coming from WordPress.
EmDash is an open-source CMS written in TypeScript and built on Astro. Its project page describes it as a spiritual successor to WordPress. It is MIT licensed, and the code lives in the emdash-cms/emdash repository.
The project now describes itself as stable, with its core packages following semantic versioning. First-party plugins and plugin tooling are still on 0.x versions. Check the repository for the current release before you start.
According to the project, EmDash includes:
Because it is an Astro integration, EmDash runs inside your Astro site. You build the front end with normal Astro components and the admin comes along with it.
EmDash is designed for Cloudflare, using D1 for the database, R2 for media and Workers for compute. It also runs on any Node.js server with SQLite, and other backends such as Turso, PostgreSQL and S3 are supported. If you are already using Cloudflare, you can stay on its free tier while you experiment.
The quickest way to start is the create command:
npm create emdash@latest
There is also a one-click Cloudflare deploy button in the repository README. To generate TypeScript types for your content model, run:
npx emdash types
Plugins are written with definePlugin(), which declares the hooks a plugin uses and a manifest of the capabilities it needs, such as content:read or email:send. Each plugin runs in its own isolated sandbox: a Worker isolate on Cloudflare, or a workerd child process on Node.js. Plugins can add admin pages, dashboard widgets, custom blocks and API routes.
WordPress plugins and themes do not run on EmDash. The project provides agent skills to help port them.
The admin includes an import wizard. It can bring in posts, pages, media and taxonomies from a WordPress export file (WXR), from the WordPress REST API or from WordPress.com. Plan the migration on a staging site first, and check that your slugs, authors, media and publication dates arrive as expected before you switch over.
An EmDash site is an Astro project with a Worker behind it, a local D1 database and an R2 bucket. If you run several of these, a tool that shows what each project is wired to saves time. That is what WorkerDock is for, and it has an EmDash shortcut that opens the site’s admin login page. If you hit database problems along the way, our local D1 helper builds the right wrangler d1 commands.
Directory
Hand-picked open-source projects you can run in your own Cloudflare account.
WorkerDock finds your local Workers, Pages and Astro projects and shows each one's port, logs and bindings in one window.