From 19134f413688326fe78e0ff704889dabfcf75283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Randall=20Havens=20=E2=96=B3=20The=20Empathic=20Tec?= =?UTF-8?q?hnologist=20=E2=9F=81=20Doctor=20Who=2042?= Date: Sat, 8 Nov 2025 18:41:51 -0600 Subject: [PATCH] Update generate-index.mjs --- tools/generate-index.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/generate-index.mjs b/tools/generate-index.mjs index ac54932..e3580a3 100755 --- a/tools/generate-index.mjs +++ b/tools/generate-index.mjs @@ -97,7 +97,8 @@ async function collectFiles(relBase = "", flat = []) { (async () => { try { const flat = await collectFiles(); - const sections = [...new Set(flat.map(f => f.path.split("/")[0]))].sort(); + // Only include sections with non-index files + const sections = [...new Set(flat.filter(f => !f.isIndex).map(f => f.path.split("/")[0]))].sort(); const allTags = [...new Set(flat.flatMap(f => f.tags))].sort(); await fs.writeFile(OUT, JSON.stringify({ flat, sections, tags: allTags }, null, 2)); console.log(`index.json built: ${flat.length} files, ${sections.length} sections, ${allTags.length} tags.`);