docs: sidebar autogen hidden support (#21454)

This commit is contained in:
Erick Friis 2024-05-08 17:23:52 -07:00 committed by GitHub
parent cb31c3611f
commit 5542eacad8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 4 deletions

View File

@ -101,6 +101,9 @@ const config = {
// eslint-disable-next-line no-param-reassign
subItem.label = subItem.label.replace(/\//g, "/\u200B");
}
if (args.item.className) {
subItem.className = args.item.className;
}
});
return sidebarItems;
},

View File

@ -29,14 +29,26 @@ module.exports = {
items: ["installation"],
},
{
type: "doc",
id: "tutorials/index",
type: "category",
link: {type: 'doc', id: 'tutorials/index'},
label: "Tutorials",
collapsible: false,
items: [{
type: 'autogenerated',
dirName: 'tutorials',
className: 'hidden',
}],
},
{
type: "doc",
id: "how_to/index",
type: "category",
link: {type: 'doc', id: 'how_to/index'},
label: "How-To Guides",
collapsible: false,
items: [{
type: 'autogenerated',
dirName: 'how_to',
className: 'hidden',
}],
},
"concepts",
{