Skip to content

Commit 9fddd5c

Browse files
authored
Restore v9 TOC menu sub-items (#6317)
1 parent 961c429 commit 9fddd5c

File tree

2 files changed

+431
-0
lines changed

2 files changed

+431
-0
lines changed

repo-scripts/api-documenter/src/toc.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ function generateTocRecursively(
8585
section: []
8686
};
8787

88+
for (const member of apiItem.members) {
89+
// only classes and interfaces have dedicated pages
90+
if (
91+
member.kind === ApiItemKind.Class ||
92+
member.kind === ApiItemKind.Interface
93+
) {
94+
const fileName = getFilenameForApiItem(member, addFileNameSuffix);
95+
entryPointToc.section!.push({
96+
title: member.displayName,
97+
path: `${g3Path}/${fileName}`
98+
});
99+
}
100+
}
101+
88102
toc.push(entryPointToc);
89103
} else {
90104
// travel the api tree to find the next entry point

0 commit comments

Comments
 (0)