Skip to content

Commit cf7739a

Browse files
authored
Merge pull request #161 from code0-tech/feat/#154
File-only relative links broken with mdx files
2 parents f740341 + 2b8f650 commit cf7739a

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)