docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Open page to sidebar item that is not position 1

Open aileenxu14 opened this issue 3 years ago • 4 comments

Have you read the Contributing Guidelines on issues?

Description

I have a doc in my top navigation bar that upon opening I want to land on an item that is sidebar position 3. Is there a way to do this outside of changing the order of the items?

Self-service

  • [ ] I'd be willing to address this documentation request myself.

aileenxu14 avatar Sep 15 '22 21:09 aileenxu14

i would like work on this issue

rahul3002 avatar Sep 18 '22 10:09 rahul3002

What does that mean? Let's say the sidebar structure is:

1. Doc 1
2. Category 1
   1. Doc 2
   2. Doc 3
3. Category 2

Do you wish it to navigate to "category 2" or "doc 3"? Do you have a motivating use case where this UX makes sense?

Note that you have chosen the wrong template. Using "documentation" instead of "feature" means you missed a lot of the required content that we ask you to fill out in order to understand your use case.

Josh-Cena avatar Sep 19 '22 14:09 Josh-Cena

In this particular instance I'd want to land on Category 2, but I have other instances where I may want to show Doc 2 or otherwise. For example, if I want to skip a "getting started" section that would typically be in position one, or if I want to highlight the most relevant section in a sidebar, or point to a "what's new" section that isn't in position 1. Right now, I can't find a way to activate a particular sidebar position after clicking on the navbar, and that's what I want to find a solution for.

Also, thanks for the note on template, I haven't posted here before so that's good to know.

aileenxu14 avatar Sep 19 '22 17:09 aileenxu14

I'm not sure to understand this problem with just text, please create a repro and mockups. We don't even know which navbar item type you are using here.

If you want to link to a specific doc/category/url, you do not have to use type: 'doc' and you can just provide the direct link instead.

slorber avatar Sep 29 '22 09:09 slorber