Skip to content

Commit 2b8f650

Browse files
committed
fix: The relative links for file-only links only handle .md file. It also needs to handle .mdx files.
1 parent f740341 commit 2b8f650

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function createRelativeLinkWithFilenameOnly(
7979

8080
const [path, hash] = href.split('#');
8181

82-
if (path.endsWith('.md')) {
82+
if (path.endsWith('.md') || path.endsWith('.mdx')) {
8383
finalHref = `./${path}${hash ? `#${hash.toLowerCase()}` : ''}`;
8484
}
8585

0 commit comments

Comments
 (0)