From d58e08b89eb3b4b6c4080383562e57f75b1da5b7 Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sat, 5 Sep 2026 16:45:31 +0000 Subject: [PATCH] feat(content): extend chapters schema with route map + panel fields Add cards[].href and cards[].cta for the landing route map's six cards whose call-to-action text is not uniform (Open chapter / Open lab / Open desk). Add sections[].panelLabel, panelCode, panelHint for the highlighted rule panels on /models/, /agents/, /skills/. Add top-level threadLabel / threadText / footer for the landing-page strip and the chapter-page footer line. Both locales remain mandatory on every localized field. Co-Authored-By: Claude Code --- src/content/config.ts | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/content/config.ts b/src/content/config.ts index 5658bf1..ccefe1c 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -92,9 +92,23 @@ const skillInstallPrompts = defineCollection({ }), }); -// Chapter copy for /models/, /agents/, /skills/, /summary/. The body of -// each page composes one or more sections; the field names mirror what the -// existing HTML already says aloud (eyebrow / lede / card titles). +// Chapter copy for /models/, /agents/, /skills/, /summary/ and the landing +// route map. The body of each page composes one or more sections; the +// field names mirror what the existing HTML already says aloud (eyebrow / +// lede / card titles). +// +// `cards[].href` and `cards[].cta` were added in task 04b: the landing +// route map's six cards have non-uniform call-to-action text (four read +// "Open chapter →", one "Open lab →", one "Open desk →"), so a single +// hard-coded default would be wrong. `href` is the destination; `cta` is +// the localized link text. +// +// `sections[].panelLabel` / `panelCode` / `panelHint` carry the highlighted +// rule panels on /models/, /agents/, and /skills/ (the routing rule, the +// MAIN / ORCHESTRATOR tree, and the package-anatomy hint). +// +// `threadLabel` / `threadText` and `footer` carry the landing-page thread +// strip and footer line. const chapters = defineCollection({ type: 'data', schema: z.object({ @@ -102,12 +116,17 @@ const chapters = defineCollection({ eyebrow: localized, title: localized, lede: localized, + threadLabel: localized.optional(), + threadText: localized.optional(), + footer: localized.optional(), cards: z .array( z.object({ label: localized, title: localized, copy: localized, + href: z.string().optional(), + cta: localized.optional(), }), ) .optional(), @@ -117,6 +136,9 @@ const chapters = defineCollection({ eyebrow: localized.optional(), title: localized, copy: localized.optional(), + panelLabel: localized.optional(), + panelCode: localized.optional(), + panelHint: localized.optional(), steps: z .array( z.object({