building-emdash-site

Build and customize EmDash CMS sites on Astro with schema, queries, and seed files.

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/tatran0195/emdash-with-docs --skill building-emdash-site-tatran0195
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: building-emdash-site
Source: https://github.com/tatran0195/emdash-with-docs/tree/main/templates/blank/.agents/skills/building-emdash-site
Command: npx skills add https://github.com/tatran0195/emdash-with-docs --skill building-emdash-site-tatran0195

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a site on the EmDash CMS requires learning its database-backed schema model, live content collections, seed file format, and rendering APIs, and small mistakes like treating image fields as strings or mixing up slugs with database IDs silently break pages. ## Core Features & Use Cases - Schema and Seed Authoring: Define collections, field types, taxonomies, menus, widget areas, sections, and bylines in a seed.json file applied on first run. - Content Querying and Rendering: Query entries with getEmDashCollection and getEmDashEntry, render Portable Text and CMS images, and wire cache hints for automatic invalidation. - Site Features and Deployment: Configure site settings, navigation menus, search, SEO meta, comments, and deploy to Node.js with SQLite or Cloudflare with D1 and R2. - Use Case: Create a blog with categories, tags, an RSS feed, sidebar widgets, and full-text search by writing a seed file and server-rendered Astro pages following the documented patterns. ## Quick Start Use the building-emdash-site skill to scaffold an EmDash blog with a posts collection, category taxonomy, and seed content.

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?▼

Add the emdash integration to astro.config.mjs with a database and storage adapter, create src/live.config.ts registering the emdashLoader, and write a seed/seed.json defining collections and content. Pages are server-rendered and query content via getEmDashCollection and getEmDashEntry.

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

Use getEmDashCollection for lists with options like status, limit, cursor, orderBy, and where filters, and getEmDashEntry for a single entry by slug. Always pass the returned cacheHint to Astro.cache.set so published changes invalidate the cache.

Can I deploy an EmDash site to Cloudflare Workers?▼

Yes, use the @astrojs/cloudflare adapter with d1 and r2 adapters from @emdash-cms/cloudflare, plus a wrangler.jsonc declaring D1 and R2 bindings. Sandboxed plugins require Dynamic Workers, available on paid Cloudflare plans.

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

Image fields are objects with id, src, and alt properties, not plain URL strings. Pass the whole object to the Image component from emdash/ui, or access featured_image.src explicitly in an img tag.

Why does getEntryTerms return empty results in EmDash?▼

getEntryTerms requires the database ULID from entry.data.id, not the slug in entry.id, and the taxonomy name must exactly match the seed definition such as "category" rather than "categories". Mismatches 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. Plugins are registered in astro.config.mjs and run in sandboxed Worker isolates.