feat(site): drop .html from the routes - #32
Merged
Conversation
Pages already resolves /docs to docs.html — it answers 200 with the page, no redirect — so the site was linking to an implementation detail it never had to expose. Links, canonicals, og:urls and the sitemap now use /claude and /docs. The old .html URLs keep answering, so anything already linked, including the Community listing, still lands. Two things had to follow the routes rather than break behind them. CI's link check resolved an href against the literal path only, so every extensionless link would have failed the deploy; it now accepts the .html twin. And `npm run site` was python's http.server, which does not do that resolution at all, so the nav would have 404'd locally while working in production — it is now a small node server that resolves a request the way Pages does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJ5rqmRHgZn76zd5ytr2Zh
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
/claudeand/docsinstead of/claude.htmland/docs.html.Pages already resolves the extensionless form —
curl -o /dev/null -w '%{http_code}' https://tofig.aca.so/docsanswers 200 with the page and no redirect — so the site was linking to an implementation detail it never had to expose. This changes links, canonicals,og:urls and the sitemap. The old.htmlURLs keep answering, so anything already linked (including the Figma Community listing) still lands, and the canonical tags point search engines at the clean form.Two things had to follow the routes
.htmltwin.npm run sitewaspython3 -m http.server, which does no such resolution — the nav would have 404'd locally while working in production. Replaced with a ~40-line node server that resolves a request the way Pages does (literal path →.html→index.html). Not inpackage.json'sfiles, so it doesn't ship to npm.Verified
Preview server:
/,/claude,/docs, static assets all 200 with correct content types, unknown path 404s. Headless Chrome on all three pages — no page errors, no failed requests, zero remaining.htmlhrefs, canonical andog:urlcorrect on each. Clicking Docs in the nav lands on/docs. The updated link check passes locally against the new hrefs.🤖 Generated with Claude Code
https://claude.ai/code/session_01NJ5rqmRHgZn76zd5ytr2Zh