Skip to content

Commit

Permalink
feat: expand active page when it has subpages on modern template (#8896)
Browse files Browse the repository at this point in the history
  • Loading branch information
MihkelAuv authored Jun 21, 2023
1 parent e0f8953 commit cc6141c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/modern/src/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export async function renderToc(): Promise<TocNode[]> {
node.href = url.href
active = normalizeUrlPath(url) === normalizeUrlPath(window.location)
if (active) {
if (node.items) {
node.expanded = true
}
selectedNodes.push(node)
}
}
Expand Down

0 comments on commit cc6141c

Please sign in to comment.