mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 11:36:53 +02:00
fix(content-docs): render category with no subitems as a normal link (#6495)
This commit is contained in:
parent
049b2c84c6
commit
3573b5e4a9
6 changed files with 120 additions and 5 deletions
|
@ -82,7 +82,13 @@ function generateHugeSidebarItems() {
|
|||
|
||||
function generateRecursive(maxLevel, currentLevel = 0) {
|
||||
if (currentLevel === maxLevel) {
|
||||
return [];
|
||||
return [
|
||||
{
|
||||
type: 'link',
|
||||
href: '/',
|
||||
label: `Link (level ${currentLevel + 1})`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const linkItems = [...Array(linksCount).keys()].map((index) => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue