-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Highlight active sidebar item when child page is loaded #2257
Comments
Once again, briefly summarized. You have a page (.md file) which is also included in your sidebar. The problem Vitepress has is that it can't always assume that the project directory is structured the same way as the manually created sidebar. A possible solution could be to also iniclude activeMatch for a sidebar item, like it is currently for the navigation item: |
Yes exactly. Well summarised- thank you. |
I have the same scene requirement. It would be great if the sidebar could support configuring activeMatch. |
Yeah I think this will be a great addition. |
We will will also highly benefit from such a |
Is there any update or work around for this? |
Is your feature request related to a problem? Please describe.
Not every page in my docs should be in the sidebar. For example having a top-level page "Learn to do X" and that page pointing to variants with different technologies.
If the sidebar has /guide and I visit /guide, then the sidebar item for the route is highlighted with an active state. If I visit /guide/subpage, it does not.
This makes it hard for users to know where they are on a website, and does not auto-expand the section they are in.
Describe the solution you'd like
Either behavior that child pages make the parent page active in the sidebar, or provided as an option.
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: