-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feat(v2): make sidebar collapsible #1817
Conversation
Deploy preview for docusaurus-2 ready! Built with commit e975f38 |
Deploy preview for docusaurus-preview ready! Built with commit e975f38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some host like netlify, the first page load appends a trailing slash at the end /
which causes some weird behavior.
For example, when we go to https://deploy-preview-1817--docusaurus-2.netlify.com/docs/introduction and then click on another category sidebar link, you can notice that it still highlight the inactive category.
Need update changelog |
Thanks for helping to fix the issue! I simplified the code a bit to remove the trailing slash regardless. |
Motivation
For docs with a long menu (like Docusaurus and CRA), collapsing the sidebars by default will be more helpful. Thanks to the awesome sidebar metadata refactoring by @endiliey, this is now possible.
Features:
I also removed displaying a smaller + different color link on the level 3, I think we don't need that differentiation now that we have the chevron.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Load the Netlify preview and click around!
Related PRs
#1815