Skip to content

Using docs routeBasePath="/", navbar version dropdown displays incorrect version on "/" #7974

Description

@arnaud4d

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Hi,
When routeBasePath option is set to "/", going back to the home page either through the breadcrumb or the root url (company logo) resets the version to the 'current' one, whatever the version we were using.

Reproducible demo

https://doc4d.github.io/docs/19/API/ClassClass

Steps to reproduce

  1. Go to the page above (v19)
  2. Click on the company logo or the Home in the breadcrumb

Expected behavior

The home page is displayed with "v19" in the version menu

Actual behavior

The home page is displayed with "v19 R6" (which is the current one) in the version menu

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions