Use EmDash with your theme
EmDash is a content management system that runs inside your Astro site. You edit content through its admin screen at /_emdash/admin.
All 14 Peachfin Astro themes, version 1.2.0, ship as static sites built from Markdown files. You can switch any of them to EmDash using the same setup commands. Browse the Astro themes with EmDash support to choose a theme.
Before you start
You need Node.js 22.19 or later on your computer. The documented EmDash tests used Node.js 24.21.0. Open a terminal in your extracted theme folder, where package.json lives.
For a live site, choose a Node.js host or Cloudflare Workers. A Node.js host runs your site’s server process and needs persistent storage for the SQLite database and uploaded files. A Cloudflare account lets you deploy a Worker, with D1 storing content and R2 storing uploads.
The EmDash edition renders pages when visitors request them. Your host must run that server code; a static host alone cannot serve this edition. You can try the Cloudflare edition locally without a Cloudflare account.
Switch with one command
Install the theme’s dependencies first:
npm install
For Node.js hosting, run:
npm run emdash:setup
For Cloudflare Workers, run:
npm run emdash:setup -- --target cloudflare
Setup checks your Node.js version, installs pinned packages for your target, copies the EmDash configuration and content files into place, and changes the content-source import. It also registers the demo seed, which supplies collections, fields, demo entries, photographs, menus, and site settings.
On Node.js, setup loads the seed into data.db and uploads/, skipping that step if the database exists. On Cloudflare, your first admin visit loads it into local D1 and R2 storage under .wrangler/.
Start the development server:
npm run dev
With that server running, open another terminal and run:
npm run admin
This opens a local admin login without requiring a passkey. The live site refuses this development login.
Setup saves replaced files in .emdash-edition/. It stops without changes if you edited a file it needs to replace or already switched the copy to the other target. Use the manual instructions in your download’s EMDASH.md for an edited copy. Repeating setup on the same target leaves it unchanged.
What you edit in EmDash
Your theme’s collections hold its content, such as projects, journal entries, products, and pages. You write entry bodies in EmDash’s rich text editor. Menus control navigation, while Settings lets you change the site title, tagline, header logo, and favicon. Setup starts these with the theme’s demo values; empty settings use the theme’s documented fallbacks.
Other site-wide choices stay in src/site.config.ts, including colors, descriptions, home page wording, section headings, contact details, discovery, and analytics. Bundled home photographs and photo credits continue to use the theme’s asset files. The placement of the tagline and the available menus depend on your theme.
Keep the site’s url in src/site.config.ts equal to EMDASH_SITE_URL. Astro uses that configuration for canonical addresses, the sitemap, and the feed. Content, menu, and supported settings edits appear on the next request. Code and configuration edits require a build and deployment.
Put it online
Node.js host
On your server, install and build, then start the server entry point:
npm ci
npm run build
node dist/server/entry.mjs
Set HOST and PORT as your host requires. Keep data.db* and uploads/ on storage that survives deployments and restarts, and back them up.
Set EMDASH_SITE_URL to your live address. Generate an encryption key with the following command and save it as EMDASH_ENCRYPTION_KEY in your host’s secret settings:
npx emdash secrets generate
Then visit /_emdash/admin on your live domain to complete setup and create your passkey.
Cloudflare checklist
- Set
urlinsrc/site.config.tsandvars.EMDASH_SITE_URLinwrangler.jsoncto your final site address. Keep them identical. Deployment refuses placeholderexample.comaddresses. - Sign in to Cloudflare:
sh
npx wrangler login
- Review the D1 database and R2 bucket names in
wrangler.jsonc. The first deployment creates them if needed, along with the adapter’sSESSIONKV namespace for sign-in sessions. Later deployments reuse them by name. - Generate and store the encryption key:
sh
npx emdash secrets generate
npx wrangler secret put EMDASH_ENCRYPTION_KEY
Keep a separate copy of the key. Database backups do not include it.
5. Decide whether you need an R2 public URL. Uploads normally come through the Worker. If you connect a custom domain to your bucket, set publicUrl in the R2 configuration in astro.config.ts. Keep the backups/ prefix off that public domain because the bucket also contains automatic backups.
6. Optionally enable the KV object cache:
sh
npx wrangler kv namespace create CACHE
Add the returned ID to the commented cache binding in wrangler.jsonc, then uncomment that binding and both kvCache lines in astro.config.ts.
7. Build and deploy:
sh
npm run emdash:deploy
- Add your custom domain through the
routesconfiguration inwrangler.jsoncand deploy again. The domain must be active in the same Cloudflare account. - Open
/_emdash/adminon your final domain. Complete the wizard, choose sample content if wanted, and create your passkey there. Passkeys are tied to the address where you create them. -
Check a page, sign in, upload a photograph, and inspect the scheduled publishing trigger:
sh npx wrangler tail
Plugins
Registry plugins require a one-time sandbox setup for each site. On Node.js, you install the sandbox packages and add one configuration line. On Cloudflare, you add the Worker Loader binding, which requires the Workers Paid plan.
Follow the EmDash website setup guide for those steps. You can also consult the EmDash documentation.
Store themes: Joinery and Fitting Room
Your checkout links work the same after switching. Both themes include their optional Stripe cart in the Node.js and Cloudflare EmDash configurations. Enable it through commerce.cart.enabled, supply your Stripe secret key, and configure the products as described in the Astro store theme setup guide.
On Cloudflare, store the cart’s key with:
npx wrangler secret put STRIPE_SECRET_KEY
On Node.js, use your host’s secret settings. The cart comes from the theme; EmDash itself supplies no cart.
Switch back
npm run emdash:revert
Revert restores the files saved during setup and returns your content source to Markdown. It keeps your EmDash database, uploads, local Cloudflare data, deployed Cloudflare resources, and installed packages. It refuses to overwrite copied files you edited after setup.
Your EmDash edits are not exported to Markdown. The original Markdown files remain as they were before switching.
What was tested and what was not
The Daybreak and Joinery source guides record tests on October 3, 2026, with EmDash 1.0.1 and Astro 7.3.3. Setup, repeat setup, edited-file refusal, page responses, content and menu updates, local admin login, production Node builds, and revert were checked. Cloudflare checks used its local runtime and a deployment dry run.
A real Cloudflare deployment, live resource creation, secrets, custom domains, cron execution, Cloudflare Images, Worker startup time, KV caching, passkey creation, the admin screens themselves, and Windows were untested. Joinery’s optional Stripe cart in EmDash was also untested. A real dependency install was checked for Daybreak; Joinery used a shared install.
FAQ
Do you need EmDash to use your theme?
You can keep the default Markdown edition and build a static site. EmDash is installed when you switch.
Does setup import your edited Markdown content?
Setup loads the supplied demo seed. Your Markdown files and EmDash entries are maintained separately after switching.
Can you change hosting targets by running setup again?
Setup refuses a copy already switched to the other target. Revert before choosing the other target.
Should you seed again after editing menus?
With EmDash 1.0.1, applying the seed again replaces your menus. Use the admin command for later local sign-ins; after setup is complete, it signs you in without seeding.