Format
This commit is contained in:
@@ -261,17 +261,17 @@ The `"."` export has the descriptor. The `"./sandbox"` export has the implementa
|
||||
|
||||
Each feature is optional. Add only what your plugin needs:
|
||||
|
||||
| Feature | Where | Standard | Native | Purpose |
|
||||
| ------------------- | ---------------------------- | -------- | ------ | ------------------------------------------------------- |
|
||||
| **Hooks** | `definePlugin({ hooks })` | Yes | Yes | React to content/media/lifecycle events |
|
||||
| **Storage** | descriptor `storage` | Yes | Yes | Document collections with indexed queries |
|
||||
| **KV** | `ctx.kv` in hooks/routes | Yes | Yes | Key-value store for internal state |
|
||||
| Feature | Where | Standard | Native | Purpose |
|
||||
| ------------------- | ---------------------------- | -------- | ------ | ----------------------------------------------------- |
|
||||
| **Hooks** | `definePlugin({ hooks })` | Yes | Yes | React to content/media/lifecycle events |
|
||||
| **Storage** | descriptor `storage` | Yes | Yes | Document collections with indexed queries |
|
||||
| **KV** | `ctx.kv` in hooks/routes | Yes | Yes | Key-value store for internal state |
|
||||
| **API Routes** | `definePlugin({ routes })` | Yes | Yes | REST endpoints at `/_emdash/api/plugins/<id>/<route>` |
|
||||
| **Admin Pages** | Block Kit `admin` route | Yes | Yes | Admin pages via Block Kit (JSON blocks) |
|
||||
| **Widgets** | Block Kit `admin` route | Yes | Yes | Dashboard cards via Block Kit |
|
||||
| **React Admin** | `admin.entry` + React export | No | Yes | React-based admin pages and widgets (native only) |
|
||||
| **PT Blocks** | `admin.portableTextBlocks` | No | Yes | Custom block types in the Portable Text editor |
|
||||
| **Site Components** | `componentsEntry` | No | Yes | Astro components for rendering blocks on the site |
|
||||
| **Admin Pages** | Block Kit `admin` route | Yes | Yes | Admin pages via Block Kit (JSON blocks) |
|
||||
| **Widgets** | Block Kit `admin` route | Yes | Yes | Dashboard cards via Block Kit |
|
||||
| **React Admin** | `admin.entry` + React export | No | Yes | React-based admin pages and widgets (native only) |
|
||||
| **PT Blocks** | `admin.portableTextBlocks` | No | Yes | Custom block types in the Portable Text editor |
|
||||
| **Site Components** | `componentsEntry` | No | Yes | Astro components for rendering blocks on the site |
|
||||
|
||||
See the reference files for detailed syntax:
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ definePlugin({
|
||||
|
||||
## Route URLs
|
||||
|
||||
| Plugin ID | Route Name | URL |
|
||||
| --------- | --------------- | ------------------------------------------ |
|
||||
| Plugin ID | Route Name | URL |
|
||||
| --------- | --------------- | ---------------------------------------- |
|
||||
| `forms` | `status` | `/_emdash/api/plugins/forms/status` |
|
||||
| `forms` | `submissions` | `/_emdash/api/plugins/forms/submissions` |
|
||||
| `seo` | `settings/save` | `/_emdash/api/plugins/seo/settings/save` |
|
||||
|
||||
@@ -14,11 +14,11 @@ The admin UI is at `http://localhost:4321/_emdash/admin`.
|
||||
|
||||
| File | Purpose |
|
||||
| ------------------------ | ---------------------------------------------------------------------------------- |
|
||||
| `astro.config.mjs` | Astro config with `emdash()` integration, database, and storage |
|
||||
| `src/live.config.ts` | EmDash loader registration (boilerplate -- don't modify) |
|
||||
| `astro.config.mjs` | Astro config with `emdash()` integration, database, and storage |
|
||||
| `src/live.config.ts` | EmDash loader registration (boilerplate -- don't modify) |
|
||||
| `seed/seed.json` | Schema definition + demo content (collections, fields, taxonomies, menus, widgets) |
|
||||
| `emdash-env.d.ts` | Generated types for collections (auto-regenerated on dev server start) |
|
||||
| `src/layouts/Base.astro` | Base layout with EmDash wiring (menus, search, page contributions) |
|
||||
| `emdash-env.d.ts` | Generated types for collections (auto-regenerated on dev server start) |
|
||||
| `src/layouts/Base.astro` | Base layout with EmDash wiring (menus, search, page contributions) |
|
||||
| `src/pages/` | Astro pages -- all server-rendered |
|
||||
|
||||
## Skills
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/base",
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
".astro/types.d.ts",
|
||||
"emdash-env.d.ts"
|
||||
]
|
||||
}
|
||||
"include": ["src", ".astro/types.d.ts", "emdash-env.d.ts"]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "my-emdash-site",
|
||||
"compatibility_date": "2026-02-24",
|
||||
"compatibility_flags": [
|
||||
"nodejs_compat"
|
||||
],
|
||||
"compatibility_flags": ["nodejs_compat"],
|
||||
"assets": {
|
||||
"directory": "./dist",
|
||||
},
|
||||
@@ -22,4 +20,4 @@
|
||||
"bucket_name": "my-emdash-media",
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user