-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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): allow hiding docs table of contents #2012
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 5614e25 |
Deploy preview for docusaurus-preview ready! Built with commit 5614e25 |
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.
How about accessing it in the UI through frontmatter instead ? Its very coupled to theme.
docusaurus/mdx-loader also exports frontmatter, and I think there isnt much server side processing done for it to be put in metadata
In fact, I moved
Currently, our metadata has a lot of dynamic object construction like using var o = { x: 1 };
delete o.x; // true
o.x; // undefined |
Motivation
I want to be able to hide the table of contents for Infima docs where the main content width is not wide enough. Example: https://facebookincubator.github.io/infima/docs/layout/grid
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)