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-04 02:03:44 +08:00
committed by GitHub
co-authored by Alex Yang
parent a17468438d
commit 3a76b6e43b
2 changed files with 9 additions and 7 deletions
+1 -1
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>
);
},
+8 -6
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 />,
})),
};
}