From 14b6d4f54d8b7904fe837a15c99a8cfaf30c32a5 Mon Sep 17 00:00:00 2001 From: Arek Nawo Date: Tue, 10 Oct 2023 17:10:08 +0200 Subject: [PATCH] fix: Docs navigation --- apps/docs/src/components/layouts/default.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/src/components/layouts/default.astro b/apps/docs/src/components/layouts/default.astro index cd10e3ba..dc1323c0 100644 --- a/apps/docs/src/components/layouts/default.astro +++ b/apps/docs/src/components/layouts/default.astro @@ -52,7 +52,7 @@ const flatMenu = [ ...flattenMenu(menu.docs, "docs", []), ...flattenMenu(menu.recipes, "recipes", []) ]; -const currentEntry = flatMenu.find((item) => item.link === Astro.url.pathname); +const currentEntry = flatMenu.find((item) => Astro.url.pathname.includes(item.link)); const nextEntry = currentEntry ? flatMenu[flatMenu.indexOf(currentEntry) + 1] : null; const prevEntry = currentEntry ? flatMenu[flatMenu.indexOf(currentEntry) - 1] : null;