docs: improve sidebar content filtering and simplify CodeBlockTabs ren… (#7109)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Abdur Rahman
2026-01-03 23:33:44 +05:30
committed by GitHub
parent a17468438d
commit 3a76b6e43b
2 changed files with 9 additions and 7 deletions

View File

@@ -81,7 +81,7 @@ export default async function Page({
{...props}
className="p-0 rounded-lg border-0 bg-fd-secondary"
>
<div {...props}>{props.children}</div>
{props.children}
</CodeBlockTabs>
);
},

View File

@@ -71,12 +71,14 @@ function contentToPageTree(content: Content): PageTree.Folder {
url: content.href,
}
: undefined,
children: content.list.map((item) => ({
type: "page",
url: item.href,
name: item.title,
icon: <item.icon />,
})),
children: content.list
.filter((item) => !item.group && item.href)
.map((item) => ({
type: "page",
url: item.href,
name: item.title,
icon: <item.icon />,
})),
};
}