From 57e6e90343b204a3fa6e23fe0f7741cedfd0c9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sat, 7 Nov 2026 13:39:43 +0000 Subject: [PATCH 1/2] feat: migrate to Nuxt Content v4 (native API) Exploration: `@nuxt/content` v4 owns nuxt.com's own content (`site`), defined in `server/content.ts` with `createNuxtContent()`. It serves it under `/__nuxt_content`, snapshots it at build and generates its types; the app reads it through the native `content` client and renders documents with ``. No v3 compatibility layer. The docs, cli, examples and module docs instances stay on comark-content: the module serves one surface under a fixed base path, so it can't hold an instance per commit (`withRef`) nor several instances sharing a name. - Bump comark-content to 0.5.1 (the module's), moving from the removed `github` source to `forge` + `forges/github` - `site` leaves the push webhook and `modules/snapshot`: it ships with the deployment its push triggers - Patch nuxt-agent-discovery to accept `@nuxt/content` v4 Amp-Thread-ID: https://ampcode.com/threads/T-01a1b537-979e-7255-b1d1-f4d6b0f37278 Co-authored-by: Amp --- app/components/module/ModuleDocsPage.vue | 2 +- app/composables/useContent.ts | 5 +- app/pages/blog/[slug].vue | 2 +- app/pages/deploy/[slug].vue | 2 +- app/pages/design-kit.vue | 2 +- app/pages/docs/[...slug].vue | 2 +- app/pages/enterprise/agencies/[slug].vue | 2 +- app/pages/index.vue | 4 +- nuxt.config.ts | 16 +- package.json | 4 +- patches/nuxt-agent-discovery@0.8.1.patch | 13 + pnpm-lock.yaml | 1430 +-------------------- pnpm-workspace.yaml | 5 +- server/api/blog/reading-times.get.ts | 3 +- server/content.ts | 54 + server/utils/content/index.ts | 17 + server/utils/content/instances.ts | 4 +- server/utils/content/snapshot.ts | 4 +- server/utils/content/webhook.ts | 4 + test/unit/content-snapshot-assets.spec.ts | 5 +- test/unit/revalidate.spec.ts | 2 +- utils/factory.ts | 11 +- 22 files changed, 191 insertions(+), 1402 deletions(-) create mode 100644 patches/nuxt-agent-discovery@0.8.1.patch create mode 100644 server/content.ts diff --git a/app/components/module/ModuleDocsPage.vue b/app/components/module/ModuleDocsPage.vue index dd7037568..7ecb57d9a 100644 --- a/app/components/module/ModuleDocsPage.vue +++ b/app/components/module/ModuleDocsPage.vue @@ -17,7 +17,7 @@ const markdownComponents = {