building-emdash-site

Build and customize EmDash CMS sites on Astro with schema, seed, and rendering patterns.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/Thigh-Food/emdash --skill building-emdash-site-thigh-food
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-emdash-site
Source: https://github.com/Thigh-Food/emdash/tree/main/templates/marketing-cloudflare/.agents/skills/building-emdash-site
Command: npx skills add https://github.com/Thigh-Food/emdash --skill building-emdash-site-thigh-food

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a site on the EmDash CMS requires knowing many framework-specific conventions: image fields are objects not strings, entry slugs differ from database IDs, taxonomy names must match the seed exactly, and cache hints must be set on every page. This Skill provides all EmDash-specific patterns so you avoid silent failures and build a working site correctly the first time. ## Core Features & Use Cases - Project Configuration: Set up astro.config.mjs for Node.js or Cloudflare (D1 + R2), live.config.ts, reverse proxy handling, and TypeScript type generation. - Schema & Seed Design: Define collections, field types, taxonomies, menus, widget areas, sections, bylines, and demo content in seed.json. - Querying & Rendering: Query content with getEmDashCollection/getEmDashEntry, render Portable Text and images, add visual editing attributes, and implement list, detail, taxonomy archive, RSS, search, and 404 page patterns. - Use Case: You are building a marketing site on EmDash and need a pricing page with a hero block, a contact form collection, SEO meta, and a navigation menu. This Skill walks you through the seed schema, page templates, and deployment config step by step. ## Quick Start Ask the AI to scaffold an EmDash site with a posts collection, category taxonomy, and a homepage listing the latest published entries.

Frequently Asked Questions about building-emdash-site

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a site with EmDash CMS and Astro?

Create an Astro project with output set to server, add the emdash integration with a database and storage adapter, define your schema in seed/seed.json, and query content with getEmDashCollection and getEmDashEntry. Run npx emdash dev to start the server and access the admin UI at /_emdash/admin.

How do I query content from EmDash collections in Astro pages?

Use getEmDashCollection for lists and getEmDashEntry for single entries by slug, both imported from emdash. Always pass the returned cacheHint to Astro.cache.set so cache invalidation works when editors publish changes.

Can I deploy an EmDash site to Cloudflare Workers?

Yes, use the @astrojs/cloudflare adapter with d1 and r2 bindings from @emdash-cms/cloudflare, plus a wrangler.jsonc declaring the D1 database and R2 bucket. Alternatively, deploy on any Node.js server with SQLite and local file storage.

Why does my EmDash image field render as [object Object]?

Image fields are objects with id, src, and alt properties, not plain URL strings. Use the Image component from emdash/ui and pass the whole image object, or access featured_image.src explicitly.

Why does getEntryTerms return empty results in EmDash?

Two common causes: passing the slug (entry.id) instead of the database ULID (entry.data.id), or using a taxonomy name that does not exactly match the seed definition, such as categories instead of category. Both fail silently with empty results.

When should I create an EmDash plugin instead of theme code?

Create a plugin when you need content lifecycle hooks, custom admin pages, API routes, custom Portable Text block types, or reusable services like analytics. Site-specific pages and layouts belong in the Astro project itself.