Skip to content

Commit afbe0e1

Browse files
committed
Expand section pages
1 parent be43d52 commit afbe0e1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/project/types/website/website-navigation.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,10 @@ function expandedSidebar(href: string, sidebar?: Sidebar): Sidebar | undefined {
855855
const item = items[i];
856856
item.active = itemHasNavTarget(item, href);
857857
if (Object.keys(item).includes("contents")) {
858-
if (resolveExpandedItems(href, item.contents || [])) {
858+
if (
859+
resolveExpandedItems(href, item.contents || []) ||
860+
item.href === href
861+
) {
859862
item.expanded = true;
860863
return true;
861864
}
@@ -938,8 +941,9 @@ async function navbarEjsData(
938941
background: navbar.background || "primary",
939942
logo: resolveLogo(navbar.logo),
940943
collapse,
941-
[kCollapseBelow]: !collapse ? ""
942-
: ("-" + (navbar[kCollapseBelow] || "lg")) as LayoutBreak,
944+
[kCollapseBelow]: !collapse
945+
? ""
946+
: ("-" + (navbar[kCollapseBelow] || "lg")) as LayoutBreak,
943947
pinned: navbar.pinned !== undefined ? !!navbar.pinned : false,
944948
};
945949

0 commit comments

Comments
 (0)