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

✨ Enhancement: Special sidebar behaviour for pages for pages without sidebar item #1011

Open
benjagm opened this issue Oct 9, 2024 · 7 comments
Assignees
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Hacktoberfest Issues accepeted Hacktoberfest'24 Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@benjagm
Copy link
Collaborator

benjagm commented Oct 9, 2024

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:

Screenshot 2024-10-09 at 06 37 23

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:
Screenshot 2024-10-09 at 06 42 25

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 benjagm added ✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: Triage This is the initial status for an issue that requires triage. Status: Available No one has claimed responsibility for resolving this issue. and removed Status: Triage This is the initial status for an issue that requires triage. labels Oct 9, 2024
@github-actions github-actions bot added the Status: Triage This is the initial status for an issue that requires triage. label Oct 9, 2024
@benjagm benjagm added Hacktoberfest Issues accepeted Hacktoberfest'24 and removed Status: Triage This is the initial status for an issue that requires triage. labels Oct 9, 2024
@pavanydg
Copy link

pavanydg commented Oct 9, 2024

@benjagm I would like to work on this.

@benjagm
Copy link
Collaborator Author

benjagm commented Oct 9, 2024

@benjagm I would like to work on this.

Thanks a lot for your support!! Please go ahead!

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Oct 9, 2024
@DhairyaMajmudar
Copy link
Member

@pavanydg any progress on this ? Or any help needed ?

@pavanydg
Copy link

@DhairyaMajmudar sorry for the delay. I was working on another issue in tour site. Will update about the progress within 2 days.

@DhairyaMajmudar
Copy link
Member

@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

@pavanydg
Copy link

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Hacktoberfest Issues accepeted Hacktoberfest'24 Status: In Progress This issue is being worked on, and has someone assigned.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants