diff --git a/.changeset/optimize-d1-indexes.md b/.changeset/optimize-d1-indexes.md index 5c4ff2f..8ea704f 100644 --- a/.changeset/optimize-d1-indexes.md +++ b/.changeset/optimize-d1-indexes.md @@ -3,6 +3,6 @@ --- Optimizes D1 database indexes to eliminate full table scans in admin panel. Adds -composite indexes on ec_\* content tables for common query patterns (deleted_at + +composite indexes on ec\_\* content tables for common query patterns (deleted_at + updated_at/created_at + id) and rewrites comment counting to use partial indexes. Reduces D1 row reads by 90%+ for dashboard operations. diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 40ec596..6e7c51e 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -19,11 +19,6 @@ export default defineConfig({ label: "GitHub", href: "https://github.com/emdash-cms/emdash", }, - { - icon: "discord", - label: "Discord", - href: "https://astro.build/chat", - }, ], editLink: { baseUrl: "https://github.com/emdash-cms/emdash/tree/main/docs", diff --git a/docs/src/content/docs/concepts/architecture.mdx b/docs/src/content/docs/concepts/architecture.mdx index 73d39d4..aefd213 100644 --- a/docs/src/content/docs/concepts/architecture.mdx +++ b/docs/src/content/docs/concepts/architecture.mdx @@ -69,7 +69,7 @@ CREATE TABLE ec_posts ( -- System columns (always present) id TEXT PRIMARY KEY, slug TEXT UNIQUE, - status TEXT DEFAULT 'draft', -- draft, published, archived + status TEXT DEFAULT 'draft', -- draft, published, scheduled author_id TEXT, created_at TEXT DEFAULT (datetime('now')), updated_at TEXT DEFAULT (datetime('now')), @@ -198,8 +198,8 @@ Uploads use signed URLs for direct client-to-storage uploads, bypassing Workers Plugins extend EmDash through a WordPress-inspired hook system: -- **Content hooks** — `beforeCreate`, `afterCreate`, `beforeUpdate`, `afterUpdate`, `beforeDelete` -- **Media hooks** — `beforeMediaUpload`, `afterMediaUpload` +- **Content hooks** — `content:beforeSave`, `content:afterSave`, `content:beforeDelete`, `content:afterDelete` +- **Media hooks** — `media:beforeUpload`, `media:afterUpload` - **Isolated storage** — Each plugin gets namespaced KV access - **Admin UI extensions** — Dashboard widgets, settings pages, custom field editors diff --git a/docs/src/content/docs/concepts/collections.mdx b/docs/src/content/docs/concepts/collections.mdx index 0ed7cef..f25d338 100644 --- a/docs/src/content/docs/concepts/collections.mdx +++ b/docs/src/content/docs/concepts/collections.mdx @@ -21,7 +21,7 @@ Create collections through the admin panel under **Content Types**. Each collect | `labelSingular` | Singular form (e.g., "Post") | | `description` | Optional description for editors | | `icon` | Lucide icon name for the admin sidebar | -| `supports` | Features like drafts, revisions, preview, scheduling | +| `supports` | Features like drafts, revisions, preview, scheduling, search, seo |