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
|
// Chapter copy for /models/, /agents/, /skills/, /summary/ and the landing
|
||||||
// each page composes one or more sections; the field names mirror what the
|
// route map. The body of each page composes one or more sections; the
|
||||||
// existing HTML already says aloud (eyebrow / lede / card titles).
|
// 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({
|
const chapters = defineCollection({
|
||||||
type: 'data',
|
type: 'data',
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
@@ -102,12 +116,17 @@ const chapters = defineCollection({
|
|||||||
eyebrow: localized,
|
eyebrow: localized,
|
||||||
title: localized,
|
title: localized,
|
||||||
lede: localized,
|
lede: localized,
|
||||||
|
threadLabel: localized.optional(),
|
||||||
|
threadText: localized.optional(),
|
||||||
|
footer: localized.optional(),
|
||||||
cards: z
|
cards: z
|
||||||
.array(
|
.array(
|
||||||
z.object({
|
z.object({
|
||||||
label: localized,
|
label: localized,
|
||||||
title: localized,
|
title: localized,
|
||||||
copy: localized,
|
copy: localized,
|
||||||
|
href: z.string().optional(),
|
||||||
|
cta: localized.optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.optional(),
|
.optional(),
|
||||||
@@ -117,6 +136,9 @@ const chapters = defineCollection({
|
|||||||
eyebrow: localized.optional(),
|
eyebrow: localized.optional(),
|
||||||
title: localized,
|
title: localized,
|
||||||
copy: localized.optional(),
|
copy: localized.optional(),
|
||||||
|
panelLabel: localized.optional(),
|
||||||
|
panelCode: localized.optional(),
|
||||||
|
panelHint: localized.optional(),
|
||||||
steps: z
|
steps: z
|
||||||
.array(
|
.array(
|
||||||
z.object({
|
z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user