Skip to content

Commit a984307

Browse files
committed
Allo category sidebar items to have a link.
Signed-off-by: Thomas Hallgren <thomas@tada.se>
1 parent 3d811a2 commit a984307

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docusaurus.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ const config: Config = {
8585
href: linkItem.link
8686
}
8787
}
88+
if(linkItem.items) {
89+
return {
90+
type: 'category',
91+
label: linkItem.title,
92+
link: {
93+
type: 'doc',
94+
id: linkItem.link
95+
},
96+
items: linkItem.items.map(linkToItem)
97+
}
98+
}
8899
return {
89100
type: 'doc',
90101
label: linkItem.title,

0 commit comments

Comments
 (0)