Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v2) new home page feature in alpha-55 appears to randomly choose sidebars to show #2784

Closed
taylorreece opened this issue May 21, 2020 · 0 comments · Fixed by #2785
Closed
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers

Comments

@taylorreece
Copy link
Contributor

🐛 Bug Report

I have a docusaurus-built site with multiple sidebars, and recently took advantage of #2652 to designate a page to be the "home" page.

The home page appears to choose a random sidebar of the my five available to present alongside the home page.

I'm not sure how the sidebar shown alongside the home page is chosen, nor why a seemingly random one shows up with each compilation of my site.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

Using alpha-55, create a docusaurus page with multiple sidebars and a page designated the 'home' page. Refresh the home page several times, sometimes in different browsers. Stop and restart your development server. You'll find that you see different sidebars, seemingly randomly.

I have a sample at https://github.com/taylorreece/docusaurus-bug-poc
If you pull that repo down, and

cd website
yarn run start

The sidebar you see at http://localhost:3000/docs will be a random side bar. If you stop and restart your dev server a few times you'll see other random side bars crop up.

Expected behavior

I guess I would expect the first sidebar defined in sidebars.js to be used... maybe it would be good to be able to designate which sidebar to present?

(Write what you thought would happen.)

Actual Behavior

Refresh the home page several times, sometimes in different browsers. Stop and restart your development server. You'll find that you see different sidebars, seemingly randomly.

Your Environment

  • Docusaurus version used: 2.0.0-alpha.55
  • Environment name and version (e.g. Chrome 81.0.4044.138, Node.js 12.16.2):
  • Operating system and version (desktop or mobile): MacOS 10.15.4

Reproducible Demo

(Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.)

@taylorreece taylorreece added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant