diff --git a/apps/cli/sync.ts b/apps/cli/sync.ts index ba41ad6..aafee66 100755 --- a/apps/cli/sync.ts +++ b/apps/cli/sync.ts @@ -196,10 +196,13 @@ async function readmeTopics(): Promise> { return map; } -/** Blume folder meta: exact topic label (the folder slug loses `/` and case) and curriculum order. */ +/** + * Blume folder meta: exact topic label (the folder slug loses `/` and case) and + * curriculum order. An unplanned category group (warm-ups) has no README + * number and sorts at 0, ahead of topic 1, so the sidebar opens on the basics. + */ function groupMeta(topic: Topic): string { - const order = topic.order === undefined ? "" : `, order: ${topic.order}`; - return `import { defineMeta } from "blume";\n\nexport default defineMeta({ title: ${JSON.stringify(topic.name)}${order} });\n`; + return `import { defineMeta } from "blume";\n\nexport default defineMeta({ title: ${JSON.stringify(topic.name)}, order: ${topic.order ?? 0} });\n`; } // ── inline-code formatting heuristics ────────────────────────────