fix(registry): redirect /design.md to canonical /DESIGN.md#448
Open
bntvllnt wants to merge 1 commit into
Open
Conversation
|
ntk preview
Built from |
Lowercase /design.md returned 404 while /DESIGN.md (referenced in sitemap.ts, llms.txt and llms-full.txt) served the design guide. Add a 308 redirect so the natural lowercase guess resolves to the canonical markdown route. Done in middleware, not a route folder or next.config: a sibling app/design.md/route.ts is rejected by tsc (folder casing collision with DESIGN.md), and next.config redirects() match case-insensitively, which would loop /DESIGN.md -> /DESIGN.md. A case-sensitive check in middleware avoids both while leaving the canonical route untouched. Closes #447 Claude-Session: https://claude.ai/code/session_01Kx4Zwv76SZhVxwctKsquBN
1f8ac48 to
923529a
Compare
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
Add a 308 permanent redirect
/design.md->/DESIGN.md.Why
The design guide is served at the canonical
/DESIGN.md(uppercase) — referenced insitemap.ts,llms.txt,llms-full.txt. The natural lowercase guess/design.mdreturned 404 (Next.js segments are case-sensitive). This makes the lowercase path resolve to the canonical markdown route. A/design.txtplain-text alias already exists; both serve the same body viagetDesignGuideMarkdown().How
app/design.md/route.ts->permanentRedirect("/DESIGN.md")(relative Location, proxy-safe).Verification (local, next dev)
lint PASS - tsc PASS - react-doctor 100/100
Closes #447
https://claude.ai/code/session_01Kx4Zwv76SZhVxwctKsquBN