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

Bad DX for sites without sidebar file #4752

Closed
slorber opened this issue May 7, 2021 · 3 comments
Closed

Bad DX for sites without sidebar file #4752

slorber opened this issue May 7, 2021 · 3 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@slorber
Copy link
Collaborator

slorber commented May 7, 2021

🐛 Bug Report

See #4738

When using Docusaurus docs plugin (single or multi-instance) without sidebarPath, user gets a warning:

The sidebar file of docs version [current] does not exist. It is optional, but should rather be provided at website/sidebars.json

  • the error message is not very good, and does not even mention which docs plugin instance is concerned
  • when using multi-instance, the default sidebarsPath value is always sidebars.json (for all docs instances) => not very good

Solution:

  • We don't need a default sidebarsPath value
  • We should allow sidebarsPath: false to disable sidebars for a plugin instance, without any warning
  • We should allow sidebarsPath: undefined to have a fully auto-generated sidebar, without any warning
  • We should warn if sidebarsPath is using a path to a sidebar file that does not exist
@slorber slorber added bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. labels May 7, 2021
@nam-hle
Copy link
Contributor

nam-hle commented May 10, 2021

Maybe I can try this 🚀

@slorber
Copy link
Collaborator Author

slorber commented May 10, 2021

yes please @nam-hle , happy to help on Discord if you need anything ;)

@lex111
Copy link
Contributor

lex111 commented May 28, 2021

Closing this issue since it is has been resolved in #4775.

@lex111 lex111 closed this as completed May 28, 2021
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 help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
Development

No branches or pull requests

3 participants