Skip to content

feat: version the website docs#179

Open
V3RON wants to merge 7 commits into
mainfrom
feat/website-doc-versioning
Open

feat: version the website docs#179
V3RON wants to merge 7 commits into
mainfrom
feat/website-doc-versioning

Conversation

@V3RON

@V3RON V3RON commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What is this?

This PR splits the website docs into two versions: latest for the current release snapshot and v2 for the existing docs content. The site now defaults to latest while still allowing readers to switch back to v2.

How does it work?

The docs are moved into versioned directories under website/docs, and Rspress is configured with multi-version support so latest is served at the root URL. The versioned search index is enabled, and both versions stay available through the shared version switcher.

Why is this useful?

  • Keeps the current release documentation separate from the older v2 docs.
  • Makes latest the default experience without hiding v2.
  • Sets up the website for future release tracks using the same pattern.

V3RON and others added 7 commits June 3, 2026 14:16
Split the docs into latest and v2 versioned trees and enable Rspress multi-version routing with latest as the default.
Add a short note in the rspress config explaining why sidebar and nav are built by hand for versioned docs.
#189)

## Summary

- Sets `v2` as the default version in `rspress.config.ts` so the latest
docs live at the bare URL path
- Generates sidebar and nav dynamically in `rspress.config.ts` by
reading the `_meta.json` files at config time -adding a new page only
requires updating the relevant `_meta.json`, no changes to
`rspress.config.ts` needed

## Root cause

Rspress's `multiVersion` feature routes the default version without a
URL prefix. When both `_meta.json` and `_nav.json` exist at the version
root, rspress uses "global sidebar" mode and collapses the entire
sidebar into a
single `'/'` key meaning all versions share the same sidebar and
switching versions in the header has no effect on the sidebar content.

AFAIK, there is currently no documented way to use the global sidebar
with `multiVersion`. This is being tracked in a discussion with the
rspress maintainers:
web-infra-dev/rspress#3452



https://github.com/user-attachments/assets/e59d3d23-8c9b-416c-86f6-9db5a6d0e2cd

---------

Co-authored-by: Hristo Totov <hristo.totov@callstack.com>
Co-authored-by: Szymon Chmal <szymon@chmal.it>
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