From aecd4bf88945825130170d4dd30bf563f6e365de Mon Sep 17 00:00:00 2001 From: Schneider Irene <140275783+SchneiderIrene@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:10:21 +0100 Subject: [PATCH] conflicts with path: "/errors/377" from page: "/[[...markdownPath]]" --- src/pages/[[...markdownPath]].js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/[[...markdownPath]].js b/src/pages/[[...markdownPath]].js index 63fcfcc81..879243c10 100644 --- a/src/pages/[[...markdownPath]].js +++ b/src/pages/[[...markdownPath]].js @@ -151,7 +151,10 @@ export async function getStaticPaths() { files .flat() // ignores `errors/*.md`, they will be handled by `pages/errors/[errorCode].tsx` - .filter((file) => file.endsWith('.md') && !file.startsWith('errors/')) + .filter( + (file) => + file.endsWith('.md') && !file.split('/')[0].startsWith('errors') + ) //Ensure only the top-level folder is checked ); }