Skip to content

feat(site): drop .html from the routes - #32

Merged
tiagomoraes merged 1 commit into
mainfrom
feature/clean-routes
Jul 28, 2026
Merged

feat(site): drop .html from the routes#32
tiagomoraes merged 1 commit into
mainfrom
feature/clean-routes

Conversation

@tiagomoraes

Copy link
Copy Markdown
Collaborator

/claude and /docs instead of /claude.html and /docs.html.

Pages already resolves the extensionless form — curl -o /dev/null -w '%{http_code}' https://tofig.aca.so/docs answers 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 .html URLs 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

  • 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.
  • npm run site was python3 -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 → .htmlindex.html). Not in package.json's files, 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 .html hrefs, canonical and og:url correct 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

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
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@tiagomoraes
tiagomoraes merged commit ead2010 into main Jul 28, 2026
4 checks passed
@tiagomoraes
tiagomoraes deleted the feature/clean-routes branch July 28, 2026 18:06
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.

1 participant