From 2b8f6502e31749edf8df7e595b1fc93f71bbe54d Mon Sep 17 00:00:00 2001 From: nicosammito Date: Sun, 21 Jun 2026 01:15:26 +0200 Subject: [PATCH] fix: The relative links for file-only links only handle .md file. It also needs to handle .mdx files. --- app/[...slug]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/[...slug]/page.tsx b/app/[...slug]/page.tsx index dd5a4a7..4e6bc7d 100644 --- a/app/[...slug]/page.tsx +++ b/app/[...slug]/page.tsx @@ -79,7 +79,7 @@ function createRelativeLinkWithFilenameOnly( const [path, hash] = href.split('#'); - if (path.endsWith('.md')) { + if (path.endsWith('.md') || path.endsWith('.mdx')) { finalHref = `./${path}${hash ? `#${hash.toLowerCase()}` : ''}`; }