Skip to content

Configure Docusaurus trailing slash behavior - #999

Closed
darwintree wants to merge 1 commit into
mainfrom
agent/configure-docusaurus-trailing-slash
Closed

Configure Docusaurus trailing slash behavior#999
darwintree wants to merge 1 commit into
mainfrom
agent/configure-docusaurus-trailing-slash

Conversation

@darwintree

@darwintree darwintree commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Set trailingSlash: false in the Docusaurus configuration.

Why

The site is deployed through GitHub Pages, so the existing vercel.json setting does not affect production. Without an explicit Docusaurus setting, pages are emitted as directory-style index.html files. GitHub Pages then redirects no-trailing-slash URLs to trailing-slash URLs, and the current proxy chain turns that into two redirects:

HTTPS without slash -> HTTP with slash -> HTTPS with slash

Generating extensionless HTML files removes the first redirect for the canonical no-trailing-slash URL.

Impact

  • Canonical and generated internal URLs use the no-trailing-slash form.
  • No-trailing-slash page requests should resolve directly.
  • Preview validation should confirm how existing trailing-slash URLs are handled before this is marked ready for review.

Validation

  • npm run build -- --locale en
  • Confirmed the representative page is emitted as overview.html instead of overview/index.html.
  • With docusaurus serve, the no-trailing-slash URL returns 200 and the trailing-slash URL redirects once to the no-trailing-slash URL.

This change is Reviewable

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
conflux-documentation Ready Ready Preview Aug 10, 2026 3:31am

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