building-emdash-site
하는 일
이 스킬은 콘텐츠 쿼리, 페이지 렌더링, 사이트 설정을 포함해 Astro 위에 만들어진 콘텐츠 관리 시스템 EmDash로 웹사이트를 만드는 것을 돕습니다. EmDash 사이트를 새로 만들거나 바꾸는 웹 개발자를 위한 스킬입니다.
사용하는 경우
- ✓EmDash에서 새 웹사이트를 시작하고 콘텐츠 구조를 설정해야 할 때.
- ✓사이트에 게시글, 메뉴, 카테고리 같은 콘텐츠를 표시해야 할 때.
- ✓이미지, 분류 용어, 콘텐츠가 보이지 않아 원인을 찾아야 할 때.
스킬 링크
https://github.com/emdash-cms/emdash/blob/main/skills/building-emdash-site/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 EmDash 사이트에 블로그 섹션을 만들고, 각 글에 카테고리와 대표 이미지를 넣는 것을 도와줄 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 콘텐츠 스키마와 시드 데이터를 설정하고, 콘텐츠를 위한 쿼리를 작성하며, Astro 컴포넌트로 결과를 렌더링합니다. 이미지 필드가 일반 텍스트가 아니라 객체라는 등 흔한 함정도 표시합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Building an EmDash Site
EmDash is a CMS built on Astro. It stores schema in the database (not in code), serves content via live content collections, and provides a full admin UI at /_emdash/admin. Sites are standard Astro projects with the emdash integration.
Common Gotchas
These are the things that silently break sites. Know them before you start.
Image fields are objects, not strings.
post.data.featured_imageis{ id, src, alt }. Writing<img src={post.data.featured_image} />renders[object Object]. Use<Image image={post.data.featured_image} />from"emdash/ui".entry.idvsentry.data.idare different things.entry.idis the slug, prefixed with the locale (en/my-post) for locales whose URLs are prefixed (use in URLs;entry.data.slugis the bare slug).entry.data.idis the database ULID (use forgetEntryTerms,Comments, and other API calls that need the real ID). Mixing them up causes silent empty results.Taxonomy names must match the seed exactly. If your seed defines
"name": "category", you must querygetTerm("category", slug)-- not"categories". Wrong name = empty results, no error.Register cache hints when Astro's cache is enabled. Content queries return a
cacheHint; pass it toAstro.cache.set(cacheHint). UsegetSiteSettingsWithCacheHint(),getMenuWithCacheHint(),getTaxonomyTermsWithCacheHint(), andgetWidgetAreaWithCacheHint()when a cached route renders those values.No
getStaticPathsfor CMS content. EmDash content is dynamic. Pages must be server-rendered (output: "server"inastro.config.mjs).
File Structure
Every EmDash site has these key files:
my-site/
├── astro.config.mjs # Astro config with emdash() integration
├── src/
│ ├── live.config.ts # EmDash loader registration (boilerplate)
│ ├── pages/ # Astro pages (all server-rendered)
│ ├── layouts/ # Layout components
│ └── components/ # Reusable components
├── seed/
│ └── seed.json # Schema + demo content
├── emdash-env.d.ts # Generated types (from `emdash types`)
└── package.json
Workflow
1. Configure the project
Read references/configuration.md for astro.config.mjs, live.config.ts, deployment targets (Node vs Cloudflare), and type generation.
2. Design the schema
Read references/schema-and-seed.md for collection definitions, field types, taxonomies, menus, widget areas, sections, bylines, and the complete seed file format.
3. Build the pages
Read references/querying-and-rendering.md for content queries, Portable Text rendering, the Image component, visual editing attributes, caching, and common page patterns (list, detail, taxonomy archive, RSS, search, 404).
4. Wire up site features
Read references/site-features.md for site settings, navigation menus, taxonomies, widget areas, search, SEO meta, comments, and page contributions.
5. Create the seed file
Write seed/seed.json with collections, fields, taxonomies, menus, widgets, and sample content.
6. Run and verify
pnpm dev # Start the Astro dev server
The runtime runs pending migrations on the first request and, before setup is completed, applies the seed's schema and structure once. Sample content needs an explicit step; see Applying Seeds. The Astro integration generates emdash-env.d.ts when the server starts. The admin UI is at http://localhost:4321/_emdash/admin.
Quick API Cheat Sheet
// Content (entries have .data.byline and .data.bylines eagerly loaded)
import { getEmDashCollection, getEmDashEntry } from "emdash";
const { entries, nextCursor, cacheHint } = await getEmDashCollection("posts", {
limit: 10,
cursor,
orderBy: { published_at: "desc" },
});
const { entry: post, cacheHint: entryCacheHint } = await getEmDashEntry("posts", slug);
// Site features
import {
getSiteSettings,
getSiteSettingsWithCacheHint,
getMenu,
getMenuWithCacheHint,
getTaxonomyTerms,
getTaxonomyTermsWithCacheHint,
getTerm,
getEntryTerms,
getEntriesByTerm,
getWidgetArea,
getWidgetAreaWithCacheHint,
search,
getSection,
getSeoMeta,
} from "emdash";
// Bylines (standalone queries -- usually not needed since ent
자주 묻는 질문
EmDash란 무엇인가요?
Astro 위에 만들어진 콘텐츠 관리 시스템으로, 구조를 데이터베이스에 보관합니다.
이미지가 객체 텍스트로 보이는 이유는 무엇인가요?
이미지 필드는 객체이므로, 일반 텍스트로 표시하지 않고 이미지 컴포넌트로 표시해야 합니다.
관리자 화면도 포함되나요?
네. EmDash는 콘텐츠를 편집하는 기본 제공 관리 인터페이스를 제공합니다.
상세 정보
작성자의 원본 설명
Build the site-facing parts of an EmDash CMS project on Astro, including schema and seeds, content queries, Portable Text rendering, menus, taxonomies, widgets, and deployment configuration. Use for EmDash site and theme work; use creating-plugins instead when the task is plugin authoring alone.
repo: emdash-cms/emdash
인기도
- GitHub 스타
- 14k
- 순위
- #11246
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
adversarial-reviewer
14k에이전트가 코드 변경에서 숨은 버그와 안전하지 않은 가정을 찾도록 돕습니다. 요청하면 일반 리뷰를 넘어서는 심층 탐색을 합니다.
agent-browser
14k에이전트가 실제 브라우저에서 웹 페이지를 열어 동작을 확인하고, 증거로 스크린샷을 남기도록 돕습니다.
creating-plugins
14k에이전트가 EmDash CMS용 플러그인을 만들도록 돕습니다. 안전한 훅, 경로, 저장소, 관리자 화면을 포함합니다.
emdash-cli
14k에이전트가 명령줄에서 EmDash 사이트를 관리하도록 돕습니다. 콘텐츠, 미디어, 메뉴, 마이그레이션, 전체 사이트 내보내기와 가져오기를 포함합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.