From b3d3c5fbc9a53c9ff7add05dc10a7b9af145d1c8 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Tue, 22 Sep 2026 13:06:20 -0400 Subject: [PATCH] refactor(cli): default group order to 0 and clarify meta comment --- apps/cli/sync.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 ────────────────────────────