🐛 Bug Report
Version dropdown has no dropdown.
yes
To Reproduce
- Have only one /docs folder without versions
- Run
yarn run docusaurus docs:version 1.x
- Add versions dropdown to the navbar
{
type: 'docsVersionDropdown',
position: 'left',
},
Expected behavior
Dropdown with 2 versions is visible in the navbar.
Actual Behavior
Only one 1.x version is visible.
Your Environment
2.0.0-alpha.64
Reproducible Demo
Sorry, maybe later. But the root of the problem is in theme-classic that has DocsVersionDropdownNavbar component where that code exists:
// We don't want to render a version dropdown with 0 or 1 item
// If we build the site with a single docs version (onlyIncludeVersions: ['1.0.0'])
// We'd rather render a buttonb instead of a dropdown
if (versions.length <= 2) {
return undefined;
}
The next version is a hidden version and doesn't count and it's not mentioned in versions.json.
🐛 Bug Report
Version dropdown has no dropdown.
Have you read the Contributing Guidelines on issues?
yes
To Reproduce
yarn run docusaurus docs:version 1.xExpected behavior
Dropdown with 2 versions is visible in the navbar.
Actual Behavior
Only one 1.x version is visible.
Your Environment
2.0.0-alpha.64
Reproducible Demo
Sorry, maybe later. But the root of the problem is in theme-classic that has DocsVersionDropdownNavbar component where that code exists:
The
nextversion is a hidden version and doesn't count and it's not mentioned in versions.json.