Skip to content

Commit 1670721

Browse files
committed
fix a bug in navigation side bar
1 parent ddb1df8 commit 1670721

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mathnotes/navigation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ def build_level(folder: Path) -> List[Dict[str, Any]]:
111111
)
112112

113113
for subfolder in subfolders:
114-
subfolder_pages = get_pages_in_folder(subfolder, file_to_canonical)
115-
if subfolder_pages:
114+
children = build_level(subfolder)
115+
if children:
116116
# Check if current file is inside this subfolder
117117
try:
118118
current_file.relative_to(subfolder)
@@ -124,7 +124,7 @@ def build_level(folder: Path) -> List[Dict[str, Any]]:
124124
"type": "folder",
125125
"name": subfolder.name.replace("-", " ").title(),
126126
"expanded": is_ancestor,
127-
"children": build_level(subfolder), # Always include for expand/collapse
127+
"children": children,
128128
})
129129

130130
return items

0 commit comments

Comments
 (0)