From 3a76b6e43b2cbabc46bf05dab13c288f46d48858 Mon Sep 17 00:00:00 2001 From: Abdur Rahman Date: Sat, 3 Jan 2026 23:33:44 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20improve=20sidebar=20content=20filtering?= =?UTF-8?q?=20and=20simplify=20CodeBlockTabs=20ren=E2=80=A6=20(#7109)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alex Yang --- docs/app/docs/[[...slug]]/page.tsx | 2 +- docs/components/sidebar-content.tsx | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx index 6c8a5148a3..bf67169615 100644 --- a/docs/app/docs/[[...slug]]/page.tsx +++ b/docs/app/docs/[[...slug]]/page.tsx @@ -81,7 +81,7 @@ export default async function Page({ {...props} className="p-0 rounded-lg border-0 bg-fd-secondary" > -
{props.children}
+ {props.children} ); }, diff --git a/docs/components/sidebar-content.tsx b/docs/components/sidebar-content.tsx index 54e73adbc2..032f0c9d9f 100644 --- a/docs/components/sidebar-content.tsx +++ b/docs/components/sidebar-content.tsx @@ -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: , - })), + children: content.list + .filter((item) => !item.group && item.href) + .map((item) => ({ + type: "page", + url: item.href, + name: item.title, + icon: , + })), }; }