From 8b08a8024f67bb8c22b1de2a62447de6ad528f4a Mon Sep 17 00:00:00 2001 From: Paul Gottschling Date: Wed, 3 Jul 2024 12:02:19 -0400 Subject: [PATCH] get all tests to pass --- server/pages-helpers.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/pages-helpers.ts b/server/pages-helpers.ts index ee97eaa275..21b45c8e95 100644 --- a/server/pages-helpers.ts +++ b/server/pages-helpers.ts @@ -148,7 +148,6 @@ export const generateNavPaths = (fs, dirPath) => { }; const secondLvl = new Set(fs.readdirSync(dirPath, "utf8")); - console.log("secondLvl:", secondLvl); // Find all second-level category pages first so we don't // repeat them in the sidebar. secondLvl.forEach((f2) => { @@ -171,6 +170,13 @@ export const generateNavPaths = (fs, dirPath) => { secondLvl.forEach((f2) => { let fullPath2 = join(dirPath, f2); + + // This is a first-level category page that happens to exist on the second + // level. + if (sectionIntros.has(fullPath2)) { + return; + } + const stat = fs.statSync(fullPath2); section.entries.push(getEntryForPath(fs, fullPath2)); });