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) Ability to associate content with a category #3686

Closed
chrisdostert opened this issue Nov 4, 2020 · 5 comments
Closed

v2) Ability to associate content with a category #3686

chrisdostert opened this issue Nov 4, 2020 · 5 comments
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@chrisdostert
Copy link

chrisdostert commented Nov 4, 2020

🚀 Feature

Allow categories to have content i.e. be doc pages themselves.

Have you read the Contributing Guidelines on issues?

yes

Motivation

It's often the case you want the behavior that clicking on a category actually shows a page (index page) for that category.

You then of course can have sub categories or docs too.

Pitch

Please see kubernetes "concepts" docs which observe this behavior. For example concepts/containers opens a page even though it's a category https://kubernetes.io/docs/concepts/containers/

@chrisdostert chrisdostert added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Nov 4, 2020
@slorber
Copy link
Collaborator

slorber commented Nov 5, 2020

Duplicate of #2643

Note: Kubernete category is not collapsable. What's your suggestion for having a collapsible category that is also a link? What's the action on click?

@slorber slorber closed this as completed Nov 5, 2020
@chrisdostert
Copy link
Author

chrisdostert commented Nov 9, 2020

@slorber thanks for pointing me at that existing ticket.

Re: action on click)
I'd expect if you click on a category it will show the index of that category as well as showing any child items (i.e. expand that category) in the nav.

I don't know the value of collapsing docs you're currently reading so additional clicks on the same category i'd expect to do nothing.

Clicks on other items (whether children, siblings, or parents) i'd expect observe the same above mentioned behavior; show index of that category and show any child items in the nav.

@slorber
Copy link
Collaborator

slorber commented Nov 10, 2020

I thunk this could be confusing, can you find an example online reproducing this behavior?

Also it's better to move the discussions to the opened issue

@chrisdostert
Copy link
Author

@slorber re: example online) yes it's exactly how the k8s docs linked above work

@slorber
Copy link
Collaborator

slorber commented Nov 12, 2020

@chrisdostert the K8s doc is not an SPA and does not really have collapsible sidebars.
The sidebar remains static over the lifetime of the page, there is no arrow that will rotate, you just click a link and goes to another page with a different sidebar in a different state.

But this is a mode we could support in Docusaurus: remove the arrow, navigate on click, and only expand the sidebar when we navigate inside the sidebar category (including category-associated doc)

@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists in another issue or pull request and removed status: needs triage This issue has not been triaged by maintainers labels Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

No branches or pull requests

3 participants