From fe71b0ca6747867142d5653da8fdc61ab2b78383 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Wed, 15 Jan 2025 11:39:34 +0000 Subject: [PATCH] [Docs Site] Fix isCurrent sidebar item on custom pages and nested hideChildren pages --- src/components/overrides/Sidebar.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/overrides/Sidebar.astro b/src/components/overrides/Sidebar.astro index 3153b58d8b588e2..6ef236c0fc3d34b 100644 --- a/src/components/overrides/Sidebar.astro +++ b/src/components/overrides/Sidebar.astro @@ -95,7 +95,7 @@ async function handleGroup(group: Group): Promise { label: group.label, order: group.order, attrs: {}, - isCurrent: indexLink.href.slice(1, -1) === Astro.params.slug, + isCurrent: Astro.url.pathname.startsWith(indexLink.href), } as Link; }