docsVersionDropdown showing in nav bar even for non-versioned site #9586
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
closed: duplicate
This issue or pull request already exists in another issue or pull request
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Hi,
I have spent a few days scouring the internet for information on this issue; found a few people with similar issues but in my case it really seems as though Docusaurus is not working as expected.
Basically, I have my regular documentation site in the docs folder, and this is versioned. I included the docsVersionDropdown item in the nav bar, it's displayed as expected. Now I'm also using the plugin-content-docs to display a second documentation instance (this is because in some cases, I need to be able to display a subset of my documentation site). The markdown pages for this second documentation instance are in a different folder (src/embedded-pages) (this isn't ideal because they're just duplicates of the pages already in the docs folder, but I couldn't find any other way to do it, after spending over a week searching).
The problem: the docsVersionDropdown item is showing for this second documentation site also, whereas this second documentation site is not versioned. Docusaurus even knows that it's not versioned, because when I try to add "disableVersioning: true" to the plugin-content-docs, it throws an error, saying: "using "disableVersioning: true" option on a non-versioned site does not make sense."
I tried specifying in the navbar section that the docsVersionDropdown should only be displayed for the default instance, like so:
But this didn't work. The docsVersionDropdown is displayed even for the site which isn't versioned. If one clicks on any of the versions in the list, one is (of course) redirected to the other site, the one which is versioned. This surely seems like a bug?
Many thanks in advance for any advice/suggestions!
Reproducible demo
No response
Steps to reproduce
Expected behavior
I would have expected the docsVersionDropdown not to show up for an unversioned site. If it's going to show up anyway, it should be possible to use the "disableVersioning: true" option to hide it.
Actual behavior
The docsVersionDropdown is showing up everywhere.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: