From ca6fa28d0f0bcf057d83a7454493c039968d5662 Mon Sep 17 00:00:00 2001 From: Ri-Nai Date: Thu, 25 Sep 2025 11:56:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E4=BE=A7=E8=BE=B9=E6=A0=8F=E9=93=BE=E6=8E=A5=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=AF=8F=E4=B8=80=E7=B1=BB=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=9A=E8=87=AA=E5=8A=A8=E9=93=BE=E6=8E=A5=E5=88=B0?= =?UTF-8?q?=20README=20=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/navSidebar.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vitepress/navSidebar.ts b/.vitepress/navSidebar.ts index 935cf1e..d4b225f 100644 --- a/.vitepress/navSidebar.ts +++ b/.vitepress/navSidebar.ts @@ -65,7 +65,8 @@ export function generateNavAndSidebar(rootDir: string) { sidebar[`/${dir}/`] = [ { text: dir, - items, + link: readme ? `/${encodeURI(dir)}/${encodeURI(readme)}` : undefined, + items: items.filter((i) => i.link !== (readme ? `/${encodeURI(dir)}/${encodeURI(readme)}` : undefined)), }, ] if (readme) {