Skip to content

SubNavbar links don't preserve selected docs version #675

Description

@vdusek

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:

  1. Go to any API reference page
  2. Switch to version 1.12 using the version dropdown
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions