Open
Description
Describe the bug
Currently, the navbar does not highlight "Docs" or "Specification" as active when visiting pages related to specifications or documentation. This happens because the URL structure does not always contain /docs or /specification, making the active state logic ineffective.
This is little bit related to issue #1375 where previously the navbar was not active on tooling page. After fixing its working on both blogs and tooling page.
Steps To Reproduce
- Go to https://json-schema.org/draft/2019-09 (or any specification page).
- Notice that the "Specification" tab in the navbar is not highlighted as active.
- Similarly, visit any documentation-related page that does not contain /docs directly in the URL.
- The "Docs" tab does not show as active.
Expected Behavior
The "Specification" tab should be active when viewing any specification-related page (e.g., /draft/*).
The "Docs" tab should be active when viewing any documentation-related page.
Screenshots
Device Information [optional]
- OS:Linux
- Browser: Firefox
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
Yes