Skip to content

docs: add version switcher to the docs header#2044

Merged
CodeDredd merged 4 commits into
mainfrom
docs/version-switcher
Jul 20, 2026
Merged

docs: add version switcher to the docs header#2044
CodeDredd merged 4 commits into
mainfrom
docs/version-switcher

Conversation

@CodeDredd

Copy link
Copy Markdown
Owner

Adds a version select to the docs header so readers can switch between the 2.x and 1.x documentation.

  • AppVersionSelect.vue: small themed <select>; entries come from the new versions array in app.config.ts (current: true marks the version the deployment serves), so adding future versions is a one-line config change. Hidden automatically when fewer than two versions are configured.
  • AppHeader.vue: override of the Docus header (same mechanism as the existing Logo.vue override) that places the select next to the color-mode toggle.

⚠️ Before merging

  1. The 1.x entry points to https://v1.pinia-orm.codedredd.de as a placeholder — a deployment of the 1.x branch docs needs to exist there (e.g. a second Vercel project on the 1.x branch with that domain), or adjust the URL to wherever the old docs live.
  2. The 1.x branch docs should get the same component (with current on 1.x) so visitors can switch back — happy to cherry-pick this onto 1.x once the domain is decided.
  3. Local docs builds don't work in the monorepo checkout (root pnpm nuxt shadows the docs yarn nuxt — pre-existing) — please verify via the Vercel preview of this PR.

Adds a select to the header that lets readers switch between the 2.x
and 1.x documentation. Versions are configured via the 'versions' array
in app.config.ts.
@CodeDredd
CodeDredd merged commit 9f38bf2 into main Jul 20, 2026
2 checks passed
@CodeDredd
CodeDredd deleted the docs/version-switcher branch July 20, 2026 16:29
@github-actions github-actions Bot mentioned this pull request Jul 20, 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