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

How to bind a sidebar to a given top nav section #3893

Closed
ArtFlag opened this issue Dec 8, 2020 · 2 comments
Closed

How to bind a sidebar to a given top nav section #3893

ArtFlag opened this issue Dec 8, 2020 · 2 comments
Labels
documentation The issue is related to the documentation of Docusaurus

Comments

@ArtFlag
Copy link
Contributor

ArtFlag commented Dec 8, 2020

📚 Documentation

We lack documentation on how to bind new sidebars to new top nav sections.

For example, the docusaurus v2 docs have docs and API in the top nav. Each has a sidebar of its own.
How to bind sidebar for docs to docs and sidebar for API to API?

I managed to make mine work but I'm not sure how.

Have you read the Contributing Guidelines on issues?

yes

@ArtFlag ArtFlag added documentation The issue is related to the documentation of Docusaurus status: needs triage This issue has not been triaged by maintainers labels Dec 8, 2020
@slorber
Copy link
Collaborator

slorber commented Dec 8, 2020

Hi,

You don't bind a sidebar to the navbar, you bind a doc, but this doc is part of a sidebar, and we add a class when the doc's sidebar is browsed to give it a tab-like behavior.

It's documented here:

https://v2.docusaurus.io/docs/api/themes/configuration/#navbar-doc-link

If you feel we can improve the API/doc for that feature, don't hesitate to send a PR

@ArtFlag
Copy link
Contributor Author

ArtFlag commented Dec 8, 2020

I see! That was not obvious to me, thanks for clarifying.

I'll send out a PR during the week to give more visibility to the Sidebar section (it doesn't appear in the sidebar of the current docs, which a is a bummer because TOCs are essential in docs) and I'll rework the content to make things clearer.

@ArtFlag ArtFlag closed this as completed Dec 8, 2020
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation The issue is related to the documentation of Docusaurus
Projects
None yet
Development

No branches or pull requests

3 participants