Skip to content

fix(registry): redirect /design.md to canonical /DESIGN.md#448

Open
bntvllnt wants to merge 1 commit into
mainfrom
fix/design-md-redirect
Open

fix(registry): redirect /design.md to canonical /DESIGN.md#448
bntvllnt wants to merge 1 commit into
mainfrom
fix/design-md-redirect

Conversation

@bntvllnt

Copy link
Copy Markdown
Collaborator

What

Add a 308 permanent redirect /design.md -> /DESIGN.md.

Why

The design guide is served at the canonical /DESIGN.md (uppercase) — referenced in sitemap.ts, llms.txt, llms-full.txt. The natural lowercase guess /design.md returned 404 (Next.js segments are case-sensitive). This makes the lowercase path resolve to the canonical markdown route. A /design.txt plain-text alias already exists; both serve the same body via getDesignGuideMarkdown().

How

app/design.md/route.ts -> permanentRedirect("/DESIGN.md") (relative Location, proxy-safe).

Verification (local, next dev)

/design.md  -> 308  Location: /DESIGN.md
            -> follows to 200 text/markdown (design guide body)
/DESIGN.md  -> 200  text/markdown   (unchanged)
/design.txt -> 200  text/plain      (unchanged)

lint PASS - tsc PASS - react-doctor 100/100

Closes #447

https://claude.ai/code/session_01Kx4Zwv76SZhVxwctKsquBN

@vllnt-pilot

vllnt-pilot Bot commented Jun 18, 2026

Copy link
Copy Markdown

ntk preview

App Status Preview
ui-registry Ready https://pr-448-ui-registry.preview.vllnt.ai
storybook Ready https://pr-448-storybook.preview.vllnt.ai

Built from 923529a1 · public + no-index (ADR-082) · torn down on close

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/design.md (lowercase) returns 404 instead of the design guide

1 participant