Files
paperclip-docs/scripts
dd7fa3e1c6 Canonicalize docs route redirects (#40)
## Summary

- Generates explicit Cloudflare Pages `_redirects` entries for every
slash-terminated static docs route.
- Sends no-trailing-slash docs URLs to their canonical slash URL with a
one-hop 301 before the SPA fallback.
- Extends the static-route verifier to assert those redirects are
emitted and ordered before the catch-all fallback.

## Root cause

Google Search Console was inspecting the no-trailing-slash URL. The live
page currently reaches content after a redirect chain, while the sitemap
and canonical URL use the trailing-slash form. Making the redirect
explicit in `_redirects` removes ambiguity for crawlers and keeps the
canonical route consistent.

## Verification

- `npm run docs:test:static-routes`
- `git diff --check origin/main...HEAD`

Co-authored-by: DevRel Gemini <[email protected]>
Co-authored-by: Paperclip <[email protected]>
2026-07-01 17:57:14 -05:00
..