Back to templates

Template details

Masthead

Masthead is a newspaper-style news theme for EmDash CMS on Astro, with full admin editing, edge caching on Cloudflare Workers, and a dense editorial front page.

About this template

Masthead is a newspaper-style news theme for EmDash, the content management system built on Astro, aimed at editorial teams that manage many authors, sections, and desks. It ships as a free, MIT-licensed Astro 7 template that runs server-rendered on Cloudflare Workers with D1 for data and R2 for media uploads.

What is Masthead?

Masthead is a free, MIT-licensed news theme built for EmDash CMS on Astro 7, deployed server-rendered on Cloudflare Workers with D1 and R2 storage. Editors write posts, pages, sections, authors, and media through the EmDash admin UI, and the theme renders the public newspaper site — a full-width nameplate front page with a dense column grid and vertical rules, plus a single-column article layout with bylines, reading time, and a lead-story drop cap. It is published under the ondelva organization, which also offers a paid Pro edition.

Key Features

  • EmDash CMS on Astro 7 — server-rendered on Cloudflare Workers, with D1 as the database and R2 for media uploads.
  • Edge caching — public pages are cached via Workers Caching and purged automatically when content changes.
  • Full admin UI — editors manage posts, pages, sections, authors, and media from /_emdash/admin.
  • Newspaper front page — full-width nameplate, dense column grid, vertical rules, lead stories, and section columns configured in the admin.
  • Article view — single column with bylines, reading time, and a drop cap on the lead story.
  • Discovery and SEO — category and tag archives, full-text search, RSS, SEO metadata, and JSON-LD.
  • Dark mode and responsiveness — responsive from 360px, with no client-side framework on public pages.
  • AI-agent ready — includes an AGENTS.md file that works out of the box with Claude Code and Cursor.

What makes Masthead stand out?

The theme leans on typographic rules and editorial hierarchy rather than decoration, and it consolidates content management, caching, and deployment into one EmDash stack. Colors and fonts are overridden through tokens in src/styles/theme.css, webfonts are set under fonts: in astro.config.mjs, and every printed string plus the interface language lives in src/utils/ui.ts — so admin-edited content stays separate from code-level customization.

Who is it for?

  • Editorial teams at small newsrooms: publish articles across sections and desks with multiple author bylines from a single admin.
  • Newsletter or blog publishers: run category and tag archives, search, and RSS on a server-rendered site without maintaining a client-side framework.
  • Cloudflare-first developers: deploy an Astro site with D1 and R2 and get edge caching plus automatic purge on content change.
  • Astro developers using AI coding agents: start from a template that ships AGENTS.md for Claude Code and Cursor.

What can you do with Masthead?

  • Publish a multi-author news site: create posts, assign sections and authors in the admin, and let the front page compose lead stories and section columns.
  • Serve a cached, server-rendered site: public pages are cached at the edge and purged on content change, keeping full-text search and archives fast.
  • Run scheduled publishing: a per-minute Cron Trigger handles scheduled posts and cleanup.
  • Start locally fast: the Quick start scaffolds via pnpm create astro@latest --template ondelva/astro-theme-masthead, generates EMDASH_ENCRYPTION_KEY into .env, and applies sample content on first setup.

How does Masthead work?

Scaffold the project from the template, generate the encryption key with npx emdash secrets generate --write .env, then run pnpm dev and finish setup at http://localhost:4321/_emdash/admin. To deploy, create the masthead-media R2 bucket, run pnpm deploy with EMDASH_SITE_URL set (read at build time for image resizing and absolute links), then push EMDASH_ENCRYPTION_KEY as a Wrangler secret. pnpm reset wipes the local D1 database and R2 uploads and restarts the dev server so setup and the seed run again.

Pros and cons

  • The bundle exceeds Cloudflare's 3 MiB free-plan limit, so a Workers Paid plan is required.
  • The Cron Trigger uses about 20 ms of CPU, over the free plan's 10 ms, so scheduled posts run late on the free plan.
  • EmDash is in beta and ships weekly; the theme is tested with emdash 0.38.x and pins dependencies to exact versions.
  • The setup page stays public until an admin account exists, so setup should be finished immediately after the first deploy.

Pricing

Masthead is free and MIT-licensed. Masthead Pro, built on the same code, adds podcast pages and episodes, Cover and Sign-up page layouts, membership with email-link sign-in and members-only content, newsletter and corrections forms, per-article generated OG images, a podcast strip on the front page, and email support with a two-business-day response target.

FAQ

Is Masthead free?

Yes. Masthead is the free, MIT-licensed edition of the theme. A separate Masthead Pro edition adds podcasting, memberships, forms, page layouts, and per-article OG images. The free edition keeps a one-line footer credit that is easy to remove and is supported through GitHub Issues.

What are Masthead's hosting requirements?

Masthead needs Node.js 22.12 or later and pnpm 9 or newer locally, and a Cloudflare Workers Paid plan in production. The bundle is over the 3 MiB free-plan limit, and the per-minute Cron Trigger uses about 20 ms of CPU against the free plan's 10 ms limit.

Where do I configure site title and authors?

Site title, tagline, logo, menus, and authors are edited in the EmDash admin UI, not in code. Colors and fonts are overridden through tokens in src/styles/theme.css, webfonts are set under fonts: in astro.config.mjs, and all printed strings plus the language live in src/utils/ui.ts.

Screenshot of Masthead