* docs: fix critical errors in import paths, types, and API references
- Fix Cloudflare adapter imports: d1/r2 come from @emdash-cms/cloudflare, not emdash/db or emdash/astro
- Fix PortableText import path: emdash/ui, not emdash/astro
- Replace set:html with PortableText component for Portable Text content
- Fix CLI binary alias: em, not ec
- Fix media upload API: POST multipart to /api/media, not JSON to /api/media/upload
- Fix MediaValue type: src not url, provider is optional, add previewUrl
- Fix EmDashMedia to Image component (actual export name)
- Fix Cloudflare Access auth config: use access() function, not nested object
- Fix REST API methods: content/media update is PUT not PATCH, settings is POST not PUT
- Fix contributing docs: Node.js 22+, pnpm 10+, correct E2E test command
- Fix WordPress migration: remove undocumented CLI import command
* docs: fix high-priority technical errors across docs
- Fix hook names: beforeSave/afterSave, not beforeCreate/afterCreate
- Fix status values: draft/published/scheduled, not archived
- Fix field type count: 14, not 15
- Fix MCP tool count: 33, not 28
- Fix Section.previewUrl type: string, not object
- Fix getSections examples to show { items } destructuring
- Add missing CollectionSupport values: search, seo
- Update reserved field slugs to match actual code
- Add MCP server enablement note (mcp: true required)
- Clarify getStaticPaths guidance: themes must be SSR, other sites can use static
- Delete orphaned duplicate migration/plugin-porting.mdx
* docs: fix medium-priority issues across docs
- Fix broken internal links: /guides/media/ -> /guides/media-library/, /guides/seeding/ -> /themes/seed-files/
- Standardize env var to EMDASH_PREVIEW_SECRET throughout preview guide
- Fix featuredImage -> featured_image in widgets guide
- Remove Discord social link (no Discord server exists)
- Fix formatting config reference: .oxfmtrc.json, not .prettierrc
- Add audienceEnvVar to Cloudflare Access config options
- Fix content model type declarations to show actual return types
* docs: document missing plugin hooks, capabilities, and context properties
- Add 10 missing hooks to reference: cron, email (beforeSend, deliver, afterSend),
comment (beforeCreate, moderate, afterCreate, afterModerate), page (metadata, fragments)
- Document all hook event types, handler signatures, and return values
- Add exclusive hook option to configuration tables
- Add 6 missing capabilities: network:fetch:any, read:users, email:send/provide/intercept, page:inject
- Add 6 missing context properties: ctx.site, ctx.url(), ctx.users, ctx.cron, ctx.email
- Update hooks reference tables in both plugins/hooks.mdx and reference/hooks.mdx
* Format
166 lines
5.0 KiB
JavaScript
166 lines
5.0 KiB
JavaScript
import starlight from "@astrojs/starlight";
|
|
// @ts-check
|
|
import { defineConfig } from "astro/config";
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
integrations: [
|
|
starlight({
|
|
title: "EmDash",
|
|
tagline: "The Astro-native CMS",
|
|
logo: {
|
|
light: "./src/assets/logo-light.svg",
|
|
dark: "./src/assets/logo-dark.svg",
|
|
replacesTitle: true,
|
|
},
|
|
social: [
|
|
{
|
|
icon: "github",
|
|
label: "GitHub",
|
|
href: "https://github.com/emdash-cms/emdash",
|
|
},
|
|
],
|
|
editLink: {
|
|
baseUrl: "https://github.com/emdash-cms/emdash/tree/main/docs",
|
|
},
|
|
customCss: ["./src/styles/custom.css"],
|
|
sidebar: [
|
|
{
|
|
label: "Start Here",
|
|
items: [
|
|
{ label: "Introduction", slug: "introduction" },
|
|
{ label: "Getting Started", slug: "getting-started" },
|
|
{ label: "Why EmDash?", slug: "why-emdash" },
|
|
],
|
|
},
|
|
{
|
|
label: "Coming From...",
|
|
items: [
|
|
{
|
|
label: "EmDash for WordPress Developers",
|
|
slug: "coming-from/wordpress",
|
|
},
|
|
{
|
|
label: "Astro for WordPress Developers",
|
|
slug: "coming-from/astro-for-wp-devs",
|
|
},
|
|
{
|
|
label: "EmDash for Astro Developers",
|
|
slug: "coming-from/astro",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "Guides",
|
|
items: [
|
|
{ label: "Create a Blog", slug: "guides/create-a-blog" },
|
|
{
|
|
label: "Working with Content",
|
|
slug: "guides/working-with-content",
|
|
},
|
|
{ label: "Querying Content", slug: "guides/querying-content" },
|
|
{ label: "Media Library", slug: "guides/media-library" },
|
|
{ label: "Taxonomies", slug: "guides/taxonomies" },
|
|
{ label: "Navigation Menus", slug: "guides/menus" },
|
|
{ label: "Widget Areas", slug: "guides/widgets" },
|
|
{ label: "Page Layouts", slug: "guides/page-layouts" },
|
|
{ label: "Sections", slug: "guides/sections" },
|
|
{ label: "Site Settings", slug: "guides/site-settings" },
|
|
{ label: "Authentication", slug: "guides/authentication" },
|
|
{ label: "AI Tools", slug: "guides/ai-tools" },
|
|
{ label: "x402 Payments", slug: "guides/x402-payments" },
|
|
{ label: "Preview Mode", slug: "guides/preview" },
|
|
{
|
|
label: "Internationalization (i18n)",
|
|
slug: "guides/internationalization",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "Plugins",
|
|
items: [
|
|
{ label: "Plugin Overview", slug: "plugins/overview" },
|
|
{ label: "Creating Plugins", slug: "plugins/creating-plugins" },
|
|
{ label: "Plugin Hooks", slug: "plugins/hooks" },
|
|
{ label: "Plugin Storage", slug: "plugins/storage" },
|
|
{ label: "Plugin Settings", slug: "plugins/settings" },
|
|
{ label: "Admin UI Extensions", slug: "plugins/admin-ui" },
|
|
{ label: "Block Kit", slug: "plugins/block-kit" },
|
|
{ label: "API Routes", slug: "plugins/api-routes" },
|
|
{ label: "Sandbox & Security", slug: "plugins/sandbox" },
|
|
{ label: "Publishing Plugins", slug: "plugins/publishing" },
|
|
{ label: "Installing Plugins", slug: "plugins/installing" },
|
|
],
|
|
},
|
|
{
|
|
label: "Contributing",
|
|
collapsed: true,
|
|
items: [{ label: "Contributor Guide", slug: "contributing" }],
|
|
},
|
|
|
|
{
|
|
label: "Themes",
|
|
items: [
|
|
{ label: "Themes Overview", slug: "themes/overview" },
|
|
{
|
|
label: "Creating Themes",
|
|
slug: "themes/creating-themes",
|
|
},
|
|
{ label: "Seed File Format", slug: "themes/seed-files" },
|
|
{
|
|
label: "Porting WordPress Themes",
|
|
slug: "themes/porting-wp-themes",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "Migration",
|
|
items: [
|
|
{
|
|
label: "Migrate from WordPress",
|
|
slug: "migration/from-wordpress",
|
|
},
|
|
{ label: "Content Import", slug: "migration/content-import" },
|
|
{
|
|
label: "Porting WordPress Plugins",
|
|
slug: "migration/porting-plugins",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: "Deployment",
|
|
items: [
|
|
{ label: "Deploy to Cloudflare", slug: "deployment/cloudflare" },
|
|
{ label: "Deploy to Node.js", slug: "deployment/nodejs" },
|
|
{ label: "Database Options", slug: "deployment/database" },
|
|
{ label: "Storage Options", slug: "deployment/storage" },
|
|
],
|
|
},
|
|
{
|
|
label: "Concepts",
|
|
collapsed: true,
|
|
items: [
|
|
{ label: "Architecture", slug: "concepts/architecture" },
|
|
{ label: "Collections", slug: "concepts/collections" },
|
|
{ label: "Content Model", slug: "concepts/content-model" },
|
|
{ label: "The Admin Panel", slug: "concepts/admin-panel" },
|
|
],
|
|
},
|
|
{
|
|
label: "Reference",
|
|
collapsed: true,
|
|
items: [
|
|
{ label: "Configuration", slug: "reference/configuration" },
|
|
{ label: "CLI Commands", slug: "reference/cli" },
|
|
{ label: "API Reference", slug: "reference/api" },
|
|
{ label: "Field Types", slug: "reference/field-types" },
|
|
{ label: "Hook Reference", slug: "reference/hooks" },
|
|
{ label: "REST API", slug: "reference/rest-api" },
|
|
{ label: "MCP Server", slug: "reference/mcp-server" },
|
|
],
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
});
|