-
Notifications
You must be signed in to change notification settings - Fork 876
Closed
Labels
templateThe stock site templateThe stock site template
Description
Describe the bug
The modern template sets the first navbar element always as active. It seems to disregard parts of the path in the url to fully check if the path matches and only then set it active.
To Reproduce
Steps to reproduce the behavior:
- Add an index.md in the root directory and reference it
- Add subfolders with elements
- Add a toc.yml in the root directory only referencing the subfolder toc's
Expected behavior
The first element in the navbar (meaning a subfolder) should not be set to active.
Context (please complete the following information):
- OS: Windows 11
- Docfx version: 2.76.0
Additional context
The default theme does not have this issue.
docfx.json:
{
"build": {
"globalMetadata": {
"_appFooter": "<span>Copyright © 2024 MiTschMR Studios<br>Generated by <strong>DocFX</strong></span>"
},
"content": [
{
"files": [
"toc.yml",
"index.md",
"releases.md"
]
},
{
"src": "authentication",
"files": [
"toc.yml",
"*.md",
"**/*.md"
],
"dest": "authentication"
},
{
"src": "polls",
"files": [
"toc.yml",
"*.md",
"**/*.md"
],
"dest": "polls"
},
{
"src": "rewards",
"files": [
"toc.yml",
"*.md",
"**/*.md"
],
"dest": "rewards"
},
{
"src": "streams",
"files": [
"toc.yml",
"*.md",
"**/*.md"
],
"dest": "streams"
},
{
"src": "users",
"files": [
"toc.yml",
"*.md",
"**/*.md"
],
"dest": "users"
}
],
"resource": [
{
"files": [
"resources/**/*",
"logo.svg",
"favicon.ico",
"versions.json"
]
}
],
"template": [ "default", "modern", "templates/material" ],
"dest": "_site"
}
}
toc.yml (root):
- name: Authentication
href: authentication/
- name: Rewards
href: rewards/
- name: Streams
href: streams/
- name: Users
href: users/
- name: Releases
href: ./releases.md
Website with default template (built with version 2.66.0):
https://mitschmr-studios.io/documentation/twitch/
Metadata
Metadata
Assignees
Labels
templateThe stock site templateThe stock site template