Skip to content

v2) Ability to associate content with a category #3686

Closed

Description

@chrisdostert

🚀 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/

Activity

  1. added
    feature
    status: needs triage
    on Nov 4, 2020
  2. slorber commented on Nov 5, 2020

    @slorber
    Collaborator

    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?

  3. chrisdostert commented on Nov 9, 2020

    @chrisdostert
    Author

    @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.

  4. slorber commented on Nov 10, 2020

    @slorber
    Collaborator

    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

  5. chrisdostert commented on Nov 10, 2020

    @chrisdostert
    Author

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

  6. slorber commented on Nov 12, 2020

    @slorber
    Collaborator

    @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)

  7. added
    closed: duplicate
    and removed
    status: needs triage
    on Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed: duplicatefeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions