[Directory] Eliminate directory-entry lookup noise from non-product routes - #32583
Draft
mvvmm wants to merge 1 commit into
Draft
[Directory] Eliminate directory-entry lookup noise from non-product routes#32583mvvmm wants to merge 1 commit into
mvvmm wants to merge 1 commit into
Conversation
…outes
Add getDirectoryEntryBySection() in src/util/directory.ts that resolves
entries by URL section (first path segment) with a pre-built map from
entry.data.entry.url, preserving dots so 1.1.1.1 resolves correctly.
Skips known non-product routes (videos, glossary, plans, directory,
sponsorships, resources, 404) to avoid silent miss warnings.
Replace 6 scattered getEntry("directory", section.replaceAll(".", ""))
call sites across [...slug].astro, PageHead.astro, ResourcesBySelector.astro,
and sidebar.ts with the shared helper.
Results:
- "Entry directory → ... was not found." messages: 122 → 0
- No new build warnings, 8802 pages built successfully
kodster28
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added
getDirectoryEntryBySection()insrc/util/directory.ts— a shared helper that resolves directory entries by URL section (first path segment) using a pre-built map fromentry.data.entry.url. Preserves dots so1.1.1.1resolves correctly, and skips known non-product routes (videos,glossary,plans,directory,sponsorships,resources,404).Replaced 6 scattered
getEntry("directory", section.replaceAll(".", ""))call sites across 4 files with the shared helper:src/pages/[...slug].astrosrc/components/PageHead.astrosrc/components/cf/ResourcesBySelector.astrosrc/util/sidebar.ts(3 locations)Root causes
replaceAll(".", "")corrupted1.1.1.1into1111, which has no directory entry (85 warnings)/videos/,/resources/,/glossary/were looked up as directory entries (37 warnings)Results
Entry directory → ... was not found.Checklist
pnpm run check— 0 errorspnpm run build— 8,802 pages, no new warningspnpm exec prettier— clean