Skip to content

Commit

Permalink
fix: Docs navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed Oct 10, 2023
1 parent edd75f1 commit 14b6d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/docs/src/components/layouts/default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 14b6d4f

Please sign in to comment.