From f3c6a6506d6b89b4b2e385eb97168a940a481145 Mon Sep 17 00:00:00 2001 From: Steven Straatemans Date: Thu, 26 Oct 2023 14:38:19 +0200 Subject: [PATCH] fix the next/prev navigation --- .changeset/soft-mice-heal.md | 5 +++++ packages/apps/docs/package.json | 2 +- packages/apps/docs/src/scripts/remarkFrontmatterToProps.mjs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/soft-mice-heal.md diff --git a/.changeset/soft-mice-heal.md b/.changeset/soft-mice-heal.md new file mode 100644 index 0000000000..832ee1631f --- /dev/null +++ b/.changeset/soft-mice-heal.md @@ -0,0 +1,5 @@ +--- +'@kadena/docs': minor +--- + +next/prev navigation fix diff --git a/packages/apps/docs/package.json b/packages/apps/docs/package.json index b3eb3c71aa..390b2cc188 100644 --- a/packages/apps/docs/package.json +++ b/packages/apps/docs/package.json @@ -1,6 +1,6 @@ { "name": "@kadena/docs", - "version": "0.3.1", + "version": "0.3.2", "private": true, "scripts": { "7d": "npx 7d pinecone-create-index --index kda-docs --environment asia-northeast1-gcp", diff --git a/packages/apps/docs/src/scripts/remarkFrontmatterToProps.mjs b/packages/apps/docs/src/scripts/remarkFrontmatterToProps.mjs index f7818a3f06..0606ac1e6c 100644 --- a/packages/apps/docs/src/scripts/remarkFrontmatterToProps.mjs +++ b/packages/apps/docs/src/scripts/remarkFrontmatterToProps.mjs @@ -96,7 +96,7 @@ const createNavigation = (file) => { const flatData = getFlatData(); const itemIdx = flatData.findIndex((i) => { - return i && i.root === path; + return i && (i.root === path || `${i.root}/` === path); }); return {