Skip to content

Docs 1.x: serve under /v1 for the main docs site - #227

Merged
lorant-one merged 1 commit into
v1from
feat/docs-platform-switcher-and-versioning-w5qum0
Oct 18, 2026
Merged

lorant-one merged 1 commit into
v1from
feat/docs-platform-switcher-and-versioning-w5qum0

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant (chose "Move it" on the 1.x move)

Before: the 1.x docs answer at the root of v1.docs.once-ui.com.

After: they answer under /v1. Old links redirect to the same page there, for example /components/button → /v1/components/button. That lets docs.once-ui.com/v1 proxy to this deployment (core#225, mounted: true for 1.x once this is live).

How:

  • basePath: "/v1" in next.config.mjs.
  • Two basePath: false redirects (307, so they can be repointed at docs.once-ui.com/v1 once that's mounted).
  • The navigation fetch adds the base path.
  • A small next/image loader, because Next doesn't prefix a local src with basePath.

Checked: next build on this branch. Locally, / and /components/button return 307 to /v1…, /v1/components/button and /v1/api/navigation return 200, the sidebar links are /v1/…, and pages load through a proxy standing in for the main site's rewrite. Plain <img> tags with root paths (/trademarks/…) are served by the main site's public folder once this is mounted.


Generated by Claude Code

basePath is /v1, so this deployment answers at /v1/* and the main docs
site proxies docs.once-ui.com/v1 to it. Old links on v1.docs.once-ui.com
redirect to the same page under /v1. The navigation fetch and local
next/image sources add the base path, which Next does not do for them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEFHekCq3RB4HoZkbR81vP
@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
core-docs Ignored Ignored Oct 18, 2026 5:00pm UTC

@lorant-one
lorant-one merged commit ece9dbf into v1 Oct 18, 2026
3 checks passed
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.

2 participants