Skip to content

fix(docs)!: serve pages without a trailing slash and drop every redirect - #390

Merged
vite-hub[bot] merged 1 commit into
mainfrom
fix/docs-no-trailing-slash
Nov 9, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
fix/docs-no-trailing-slash

Conversation

@onmax

@onmax onmax commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Every URL in the sitemap and every canonical link on comark-ui.onmax.me answers 307. wrangler.jsonc forces a trailing slash (/annotate → /annotate/), but @vite-hub/docs writes 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, and docs/paths.ts rewrote the slash links in every page at build time.

This PR makes /annotate the only form of a page:

  • html_handling is drop-trailing-slash, so Cloudflare serves /annotate from annotate.html. Only a URL typed with a slash gets bounced, by Cloudflare itself.
  • The sources link without slashes: about 640 links across the pages, READMEs, the skill, and the URLs comark-linter prints for each rule. docs/paths.ts and the rewrite in docs/content.ts are gone.
  • docs/links.ts now fails on an internal link with a trailing slash instead of following Worker redirects.
  • The redirects in docs/server/utils/site.ts are gone, and so are the two old hosts in routes. What's left is fromAssets(), which still answers an agent that asks a page for Markdown, now at the URL without a slash.
  • docs/server/content.ts gives 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:build served by wrangler dev with the built Worker:

live this PR
Sitemap URLs that answer 200 1 of 408 (/), the rest 307 409 of 409
Canonical links with a trailing slash all 0
/zoom/getting-started/, /preset/ 301 to the new page 404
Accept: text/markdown on /zoom 307, then the Markdown copy the Markdown copy

The link check passes on 413 pages, as do pnpm check, pnpm test (2,860 tests), and pnpm run doctor.

When this deploys, detach comark.onmax.me and comark-annotate.onmax.me from the Worker in Cloudflare. I don't think wrangler deploy removes custom domains it no longer lists, and while they're attached they serve a copy of the site.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T06:59:37.786740Z
We couldn’t complete this review. Comment @codex review to try again.
94d2419 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Nov 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@390

comark-badge

pnpm add https://pkg.pr.new/comark-badge@390

comark-cards

pnpm add https://pkg.pr.new/comark-cards@390

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@390

comark-cast

pnpm add https://pkg.pr.new/comark-cast@390

comark-charts

pnpm add https://pkg.pr.new/comark-charts@390

comark-chat

pnpm add https://pkg.pr.new/comark-chat@390

comark-chips

pnpm add https://pkg.pr.new/comark-chips@390

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@390

comark-code

pnpm add https://pkg.pr.new/comark-code@390

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@390

comark-colors

pnpm add https://pkg.pr.new/comark-colors@390

comark-comments

pnpm add https://pkg.pr.new/comark-comments@390

comark-critic

pnpm add https://pkg.pr.new/comark-critic@390

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@390

comark-details

pnpm add https://pkg.pr.new/comark-details@390

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@390

comark-diff

pnpm add https://pkg.pr.new/comark-diff@390

comark-embed

pnpm add https://pkg.pr.new/comark-embed@390

comark-fields

pnpm add https://pkg.pr.new/comark-fields@390

comark-figure

pnpm add https://pkg.pr.new/comark-figure@390

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@390

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@390

comark-github

pnpm add https://pkg.pr.new/comark-github@390

comark-icon

pnpm add https://pkg.pr.new/comark-icon@390

comark-include

pnpm add https://pkg.pr.new/comark-include@390

comark-keys

pnpm add https://pkg.pr.new/comark-keys@390

comark-links

pnpm add https://pkg.pr.new/comark-links@390

comark-linter

pnpm add https://pkg.pr.new/comark-linter@390

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@390

comark-mark

pnpm add https://pkg.pr.new/comark-mark@390

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@390

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@390

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@390

comark-media

pnpm add https://pkg.pr.new/comark-media@390

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@390

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@390

comark-outline

pnpm add https://pkg.pr.new/comark-outline@390

comark-properties

pnpm add https://pkg.pr.new/comark-properties@390

comark-qr

pnpm add https://pkg.pr.new/comark-qr@390

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@390

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@390

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@390

comark-sources

pnpm add https://pkg.pr.new/comark-sources@390

comark-steps

pnpm add https://pkg.pr.new/comark-steps@390

comark-table

pnpm add https://pkg.pr.new/comark-table@390

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@390

comark-tests

pnpm add https://pkg.pr.new/comark-tests@390

comark-time

pnpm add https://pkg.pr.new/comark-time@390

comark-ui

pnpm add https://pkg.pr.new/comark-ui@390

comark-xref

pnpm add https://pkg.pr.new/comark-xref@390

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@390

commit: 94d2419

@vite-hub

vite-hub Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-09T10:31:02.413Z 4m 19s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

View session

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.

@vite-hub
vite-hub Bot merged commit 017a92f into main Nov 9, 2026
6 checks passed
@vite-hub
vite-hub Bot deleted the fix/docs-no-trailing-slash branch November 9, 2026 10:38
@github-actions github-actions Bot mentioned this pull request Nov 9, 2026
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