When on a versioned page (e.g. reference/1.12/...), clicking "Docs" or "Changelog" in the subNavbar navigates to the latest stable version instead of staying on the selected version.
Steps to reproduce:
- Go to any API reference page
- Switch to version 1.12 using the version dropdown
- Click "Docs" in the subNavbar
Expected: Navigate to docs/1.12/...
Actual: Navigates to docs/... (latest stable)
Root cause: SubNavbar items in docusaurus.config.js have static to paths (docs, /reference, docs/changelog) with no version awareness. The fix requires overriding the Navbar/Content theme component to detect the current version from the URL and inject the version slug into subNavbar item paths.
This applies to JS repos (both client & SDK) as well.