✨ Enhancement: Special sidebar behaviour for pages for pages without sidebar item
Is your feature request related to a problem? Please describe
We have some pages without sidebar item that needs to be shown, however when we show those pages it results in a sidebar with all sections collapsed. For example, the page https://json-schema.org/md-style-guide produces:
This is not ideal and we would like to find a better way to interact with the sidebar for those pages.
Describe the solution you'd like
Ideally, we'd like to define a new property in the header metadata in the page markdown to specify the parent page to be highlighted in the sidebar.
For example, if we define this new property as parentNav adding the relative path for a page without sidebar item like https://json-schema.org/md-style-guide:
---
title: Markdown Style Guide
parentNav: /overview/what-is-jsonschema
---
The expected result is to highlight /overview/what-is-jsonschema in the sidebar when accessing that page. See image below:
Describe alternatives you've considered
I think this will require:
- Define the new property in the markdown metadata.
- Define a mechanism to read that property in the typescript code reading the markdown.
- Modify DocLink function in the sidebar logic to support highlighting the referred item.
Additional context
No response
Are you working on this?
No
@benjagm I would like to work on this.
@benjagm I would like to work on this.
Thanks a lot for your support!! Please go ahead!
@pavanydg any progress on this ? Or any help needed ?
@DhairyaMajmudar sorry for the delay. I was working on another issue in tour site. Will update about the progress within 2 days.
@DhairyaMajmudar sorry for the delay. I was working on another issue in tour site. Will update about the progress within 2 days.
No worries, pls. take your time
@DhairyaMajmudar so when we open this page https://json-schema.org/md-style-guide we should highlight overview/what-is-json-shema in sidebar right? I should implement only this much right?
@DhairyaMajmudar so when we open this page https://json-schema.org/md-style-guide we should highlight overview/what-is-json-shema in sidebar right? I should implement only this much right?
yep, also pls. check for such more pages whose direct link is not given in the sidebar :)
@DhairyaMajmudar i am thinking of creating a new funciton where we can refer the navbar item to be highlighted when we open a page without navbar item. Any suggestions?
@DhairyaMajmudar @benjagm May I work on this issue, there is no activity from last month
Thank you @techmannih for showing your interest but it seems you already have a good number of issues assigned here and in conference repo. please resolve them first taking new one.
Also @pavanydg what are the updates on this, you need any help ?
@DhairyaMajmudar @benjagm i need help on this one. Like i have to extract the data from .md files to check if it has parentNav or not to check whether this is a sidebaritem or not. (this can be done using getStaticMarkdownProps) I can do this but won't it be unecessary as almost all pages won't have parentNav. So please give me some suggestions on how i should do it.
Hello @DhairyaMajmudar and @benjagm , this issue seems to have no updates. I would like to take this up!
@pavanydg if you're not working on this shall I assign this issue to Karan ?
Any updates?
@Karan-Palan I am not working on this right now. You can take it up.
@Karan-Palan I am not working on this right now. You can take it up.
Sure I'll wait for an assignment from @DhairyaMajmudar or @benjagm
@Karan-Palan still interested in taking this up?
Yeah! Just done with exams, have ample of time
@DhairyaMajmudar @benjagm , this issue has been resolved as we can observe the requested functionality on our website. So, I think we can close this issue.
The issue still seems to be not done yet : )
See the sidebar is not opening for the page https://json-schema.org/md-style-guide
Ah, I see! I believe I may have misinterpreted what I observed earlier—apologies for that :)
@Utkarsh-123github can you please work on this issue?
@benjagm I'd love to work on this 🚀
Hi @Utkarsh-123github , as discussed let's do the following:
- In this case remove the sidebar.
- For the release notes subsections mark the release notes item in the sidebar: https://json-schema.org/specification/release-notes