Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Skip category pages we already covered
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Jul 17, 2024
1 parent f89669c commit 5edc53d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/pages-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ export const navEntriesForDir = (fs, dirPath) => {
firstLvlDirs.add(fullPath);
return;
}
const fileName = parse(fullPath).name;
const dirName = parse(dirPath).name;

// This is a category page for the containing directory. We would have
// already handled this in the previous iteration. The first iteration
// does not require a category page.
if (fileName == dirName) {
return;
}

firstLvlFiles.add(fullPath);
});

Expand Down

0 comments on commit 5edc53d

Please sign in to comment.