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 <noreply@anthropic.com>
This commit is contained in:
+25
-3
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user