From 1a8cea68e1e1350771df6933ecdadfc4649cfb85 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 19:46:56 -0600 Subject: [PATCH] Update generate-index.mjs --- tools/generate-index.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/generate-index.mjs b/tools/generate-index.mjs index 6cac016..f2d6a94 100755 --- a/tools/generate-index.mjs +++ b/tools/generate-index.mjs @@ -53,8 +53,13 @@ async function collectFiles(relBase = "", flat = []) { for (const e of entries) { if (e.name.startsWith(".")) continue; + const rel = path.posix.join(relBase, e.name); const absPath = path.join(ROOT, rel); + + // Skip the SPA root index file entirely — it's the shell, not content + if (rel.toLowerCase() === "index.html" || rel.toLowerCase() === "index.md") continue; + if (e.isDirectory()) { await collectFiles(rel, flat); continue; @@ -99,7 +104,6 @@ async function collectFiles(relBase = "", flat = []) { (async () => { try { const flat = await collectFiles(); - // ONLY non-index files → dropdown 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));