Repository navigation
fix(docs)!: serve pages without a trailing slash and drop every redirect - #390
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
ℹ️ No P0 or P1 findings — one small P2 docs gap remains.
Reviewed changes in 94d2419, covering the complete 176-file diff and the slashless routing contract.
- Cloudflare routing — switches static assets to
drop-trailing-slash, retains Worker-first Markdown negotiation, and removes legacy host and path redirects. - Canonical URLs — converts docs sources, READMEs, landing links, CMS URLs, and generated linter documentation links to slashless paths.
- Validation and tests — makes the built-doc link checker reject trailing slashes and adds coverage for static asset delegation and Markdown responses.
ℹ️ Three shipped skill links still use the redirecting form
P2 Class: installable skill references retain noncanonical docs URLs. The remark, markdown-it, and marked migration references still publish diagnostics links ending in /, so agents following the shipped skill incur the exact 307 this PR removes elsewhere; convert all three to the slashless form.
Technical details
# Remove trailing slashes from migration skill links
## Affected sites
- `skills/comark-ui/references/remark-to-comark.md:3` — links to `/remark-to-comark/diagnostics/`
- `skills/comark-ui/references/markdown-it-to-comark.md:3` — links to `/markdown-it-to-comark/diagnostics/`
- `skills/comark-ui/references/marked-to-comark.md:3` — links to `/marked-to-comark/diagnostics/`
## Required outcome
- Every docs URL shipped in the installable `comark-ui` skill uses the slashless canonical form and does not require a Cloudflare redirect.gpt-5.6-sol | 𝕏
comark-annotate
comark-badge
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
Latest result Pull request merged. Final answersSession Pull request merged. Ready; HEAD unchanged and hosted checks green. Pullfrog: P2 migration-skill links retain trailing slashes; declined because P2-only pushes are prohibited. No inline threads were supplied. From docs, `vp test run --dir ../test assets.test.ts links.test.ts` passed 17 tests; focused lint and `git diff --check` passed. Initial pnpm auto-install hit protected Git metadata; validation succeeded with automatic installation disabled. No commit or push. |

Every URL in the sitemap and every canonical link on comark-ui.onmax.me answers 307.
wrangler.jsoncforces a trailing slash (/annotate→/annotate/), but@vite-hub/docswrites canonical, sitemap, and internal links without one. On top of that, the Worker kept redirects for the old hosts (comark.onmax.me, comark-annotate.onmax.me), the old per-topic pages, and renamed pages, anddocs/paths.tsrewrote the slash links in every page at build time.This PR makes
/annotatethe only form of a page:html_handlingisdrop-trailing-slash, so Cloudflare serves/annotatefromannotate.html. Only a URL typed with a slash gets bounced, by Cloudflare itself.docs/paths.tsand the rewrite indocs/content.tsare gone.docs/links.tsnow fails on an internal link with a trailing slash instead of following Worker redirects.docs/server/utils/site.tsare gone, and so are the two old hosts inroutes. What's left isfromAssets(), which still answers an agent that asks a page for Markdown, now at the URL without a slash.docs/server/content.tsgives each page its URL without the slash, so comments match the URL the browser shows.Breaking: old hosts and old paths such as
/zoom/getting-started/or/preset/now 404, and comments saved under a slash URL no longer match their page.Checked on
pnpm docs:buildserved bywrangler devwith the built Worker:/), the rest 307/zoom/getting-started/,/preset/Accept: text/markdownon/zoomThe link check passes on 413 pages, as do
pnpm check,pnpm test(2,860 tests), andpnpm run doctor.When this deploys, detach comark.onmax.me and comark-annotate.onmax.me from the Worker in Cloudflare. I don't think
wrangler deployremoves custom domains it no longer lists, and while they're attached they serve a copy of the site.