मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)14k · #11246

building-emdash-site

यह क्या करती है

यह स्किल Astro पर बने CMS EmDash पर वेबसाइट बनाने में मदद करती है, जिसमें कंटेंट क्वेरी, पेज रेंडरिंग और साइट सेटअप शामिल हैं। यह उन वेब डेवलपर्स के लिए है जो EmDash साइट बना या बदल रहे हैं।

कब इस्तेमाल करें

  • ✓जब आप EmDash पर नई वेबसाइट शुरू कर रहे हैं और उसका कंटेंट ढाँचा सेट करना है।
  • ✓जब आपको साइट पर पोस्ट, मेन्यू या श्रेणियों जैसा कंटेंट दिखाना है।
  • ✓जब इमेज, taxonomy शब्द या कंटेंट नहीं दिख रहे और आपको कारण ढूँढना है।

Skill का लिंक

https://github.com/emdash-cms/emdash/blob/main/skills/building-emdash-site/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/emdash-cms/emdash/blob/main/skills/building-emdash-site/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप मेरी EmDash साइट पर एक ब्लॉग सेक्शन सेट करने में मदद कर सकते हैं, जिसमें हर पोस्ट पर श्रेणियाँ और फ़ीचर्ड इमेज हों?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट कंटेंट schema और seed डेटा सेट करता है, कंटेंट के लिए क्वेरी लिखता है, और नतीजे Astro कंपोनेंट से रेंडर करता है। वह आम गलतियों पर भी ध्यान दिलाता है, जैसे इमेज फ़ील्ड का सादे टेक्स्ट के बजाय object होना।

तकनीकी सामग्री (मूल 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.

  1. Image fields are objects, not strings. post.data.featured_image is { id, src, alt }. Writing <img src={post.data.featured_image} /> renders [object Object]. Use <Image image={post.data.featured_image} /> from "emdash/ui".

  2. entry.id vs entry.data.id are different things. entry.id is the slug, prefixed with the locale (en/my-post) for locales whose URLs are prefixed (use in URLs; entry.data.slug is the bare slug). entry.data.id is the database ULID (use for getEntryTerms, Comments, and other API calls that need the real ID). Mixing them up causes silent empty results.

  3. Taxonomy names must match the seed exactly. If your seed defines "name": "category", you must query getTerm("category", slug) -- not "categories". Wrong name = empty results, no error.

  4. Register cache hints when Astro's cache is enabled. Content queries return a cacheHint; pass it to Astro.cache.set(cacheHint). Use getSiteSettingsWithCacheHint(), getMenuWithCacheHint(), getTaxonomyTermsWithCacheHint(), and getWidgetAreaWithCacheHint() when a cached route renders those values.

  5. No getStaticPaths for CMS content. EmDash content is dynamic. Pages must be server-rendered (output: "server" in astro.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 पर बना कंटेंट मैनेजमेंट सिस्टम है, जो अपना ढाँचा डेटाबेस में रखता है।

मेरी इमेज object टेक्स्ट क्यों दिखती हैं?

इमेज फ़ील्ड object होते हैं, इसलिए उन्हें सादे टेक्स्ट के रूप में नहीं, इमेज कंपोनेंट से दिखाना चाहिए।

क्या इसमें एडमिन स्क्रीन शामिल है?

हाँ। 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
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

adversarial-reviewer

14k

यह आपके एजेंट को कोड बदलाव में छिपे बग और असुरक्षित मान्यताएँ खोजने में मदद करती है, जब आप इसे माँगें तो सामान्य समीक्षा से आगे जाकर।

कोडिंगटेस्टिंग

agent-browser

14k

यह आपके एजेंट को असली ब्राउज़र में वेब पेज परखने, उपयोगकर्ता को क्या दिखता है जाँचने, क्रियाएँ सत्यापित करने और सबूत के लिए स्क्रीनशॉट लेने देती है।

कोडिंगटेस्टिंग

creating-plugins

14k

यह आपके एजेंट को EmDash CMS के लिए प्लगइन बनाने में मदद करती है, जिसमें सुरक्षित hooks, routes, स्टोरेज और एडमिन इंटरफ़ेस हों।

कोडिंगAPI और सर्वर (backend)

emdash-cli

14k

यह आपके एजेंट को कमांड लाइन से EmDash साइट संभालने देती है, जिसमें कंटेंट, मीडिया, मेन्यू, migrations और पूरी साइट का एक्सपोर्ट या इम्पोर्ट शामिल है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills