fix(docs): correct edit-link filenames + case-insensitive URLs#43
Merged
Conversation
The 'Edit this page' source-file map had 'configuration: Configuration.md' while the real source is docs/configuration.md (lowercase), and it was missing the comparison + migrating pages — so those edit links 404'd or fell back to the repo root. Fix the map. Add a global lowercase-path middleware. Every content route is lowercase, but a mixed-case URL (hand-typed or external) rendered via the github-pages SPA fallback with the wrong/empty page and nothing highlighted in the nav (the active-state match and queryCollection().path() are case-sensitive). Redirect such paths to their lowercase form so the page resolves and the nav highlights.
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.
Two small site fixes.
Edit-link filenames: useSourceRepo.ts mapped configuration -> 'Configuration.md' but the real source is docs/configuration.md (lowercase), so that edit link 404'd; it was also missing the comparison + migrating-to-vatly pages. Corrected the case and added the two entries.
Case-insensitive URLs / nav highlight: content routes are all lowercase, but a mixed-case URL (typed/external) rendered via the github-pages SPA fallback with nothing highlighted (active-item match and queryCollection().path() are case-sensitive). Added a global lowercase-path middleware that redirects any uppercase path to its lowercase form (query/hash preserved) — page resolves and nav highlights.
Content unchanged, so lychee/markdownlint are unaffected.