diff --git a/packages/gitbook/src/lib/pages.ts b/packages/gitbook/src/lib/pages.ts index 764a4f0e5..97f8cd88e 100644 --- a/packages/gitbook/src/lib/pages.ts +++ b/packages/gitbook/src/lib/pages.ts @@ -19,6 +19,10 @@ export function resolvePagePath( } if (page.path !== pagePath) { + if (page.path.split('/').join('/') === pagePath) { + return resolvePageDocument(page, ancestors); + } + // TODO: can be optimized to count the number of slashes and skip the entire subtree const result = iteratePages(page.pages, [...ancestors, page]); if (result) {