Skip to content

chore: upgrade to VitePress 2 + Vite 8, add sitemap#128

Merged
kelsos merged 1 commit into
rotki:mainfrom
kelsos:upgrade-vitepress-2
Jun 9, 2026
Merged

chore: upgrade to VitePress 2 + Vite 8, add sitemap#128
kelsos merged 1 commit into
rotki:mainfrom
kelsos:upgrade-vitepress-2

Conversation

@kelsos

@kelsos kelsos commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Upgrades the docs site to VitePress 2 (alpha) on Vite 8, and adds a sitemap.

  • VitePress 1.6.42.0.0-alpha.17
  • vitepress-plugin-llms 1.12.01.13.1
  • vitepress-plugin-tabs 0.8.00.9.0
  • Pin vite@8.0.16 via override in pnpm-workspace.yaml (matches what vuejs.org does). Vite 8 is rolldown-based, which makes VitePress require oxc-minify — added as a devDependency (pinned to 0.134.0 to satisfy the repo's minimumReleaseAge policy).
  • CSV data loader fix: VitePress 2 resolves a loader's relative watch glob against the loader file's directory rather than the project root, so public/files/*.csv matched nothing → empty data → SSR crash on the Address Book page. Switched to an absolute glob derived from import.meta.url.
  • Sitemap: emitted only for the canonical stable build (base === '/'). The versioned latest/patch preview builds deliberately emit no sitemap so they don't publish competing/incorrect URLs.

Validation

  • ✅ Clean pnpm build on both the default and DOCS_VERSION=latest builds
  • ✅ In-browser preview, zero console errors: homepage + NavCards, CSV tables (4 headers/4 rows + download link), interactive tabs (macOS↔Windows switching), local search, code highlighting, llms "Copy page" button
  • ✅ Redirects work in-browser (/usage-guides/historical-events/usage-guides/history/events); all 44 redirect targets resolve to built pages, and get the /latest/ base prefix in the versioned build
  • ✅ Sitemap emits correct https://docs.rotki.com/... URLs on stable, and none on the versioned preview build
  • ✅ Lint passes

Notes

2.0.0-alpha.17 is a pre-release; the same VitePress 2 + Vite 8 + vitepress-plugin-llms combination is what the official vuejs.org docs run in production.

Bump VitePress 1.6.4 -> 2.0.0-alpha.17, with the plugin and toolchain
changes the new major requires:

- vitepress-plugin-llms 1.12.0 -> 1.13.1
- vitepress-plugin-tabs 0.8.0 -> 0.9.0
- pin vite 8.0.16 via pnpm override in pnpm-workspace.yaml (matches
  vuejs.org); Vite 8 is rolldown-based and so requires oxc-minify,
  added as a devDependency
- csv data loader: use an absolute watch glob, since VitePress 2 resolves
  relative loader globs against the loader file's directory rather than
  the project root (previously yielded empty data and crashed SSR)

Also add a sitemap, emitted only for the canonical stable build (base
'/'); the versioned latest/patch preview builds must not publish a
competing sitemap.
@kelsos kelsos merged commit dad357d into rotki:main Jun 9, 2026
5 checks passed
@kelsos kelsos mentioned this pull request Jun 9, 2026
@kelsos kelsos temporarily deployed to github-pages June 9, 2026 17:16 — with GitHub Actions Inactive
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