Skip to content

Version dropdown in multi-instance project #11364

Description

@rborsaru-ansys

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

Hello.
I am building a multi-instance Docusaurus site.
I have a couple of products that i want to display using different Docusaurus/plugin-content-docs.
Everything works fine until i try to setup versioning.
I can setup versioning for each of my products, but when i add the dropdown in the navbar for the two products i can see all of them in all the pages.
What i want is to not to have any versioning in the landing page and have specific version dropdown in my product pages.
Tried this setup i found on Internet but without success:
{
type: 'docsVersionDropdown',
docsPluginId: 'product-a',
position: 'right',
dropdownActiveClassDisabled: true, // don't highlight outside /product-a/*
},
{
type: 'docsVersionDropdown',
docsPluginId: 'product-b',
position: 'right',
dropdownActiveClassDisabled: true,
},
Is this even possible?

Thank you.

Reproducible demo

No response

Steps to reproduce

Create a Docusaurus site.
Follow multi-instance documentation to setup two products docs that are using different docs-plugin.
Create a new version for each of the products.
Add version drop-down and set it not to display only on product docs pages.

Expected behavior

Version dropdown for a product only appears on that product docs pages.

Actual behavior

Both version dropdown appear on all pages.

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

    closed: invalidThis issue / PR is low quality, unwanted or spam and doesn't qualify as a contribution in any way.

    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