From da33c07ba7b060d7b265f12632f1266bb28a9b70 Mon Sep 17 00:00:00 2001 From: Marshall Ku Date: Sun, 19 Jan 2025 08:08:00 +0900 Subject: [PATCH] Fix path of mdx file --- apps/blog/src/plugins/lib/remarkLocalImages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/blog/src/plugins/lib/remarkLocalImages.ts b/apps/blog/src/plugins/lib/remarkLocalImages.ts index b72ef6d..4aa6f6e 100644 --- a/apps/blog/src/plugins/lib/remarkLocalImages.ts +++ b/apps/blog/src/plugins/lib/remarkLocalImages.ts @@ -17,7 +17,7 @@ export default function remarkLocalImages({ slug }: { slug: string }) { } // Absolute path to the MDX file - const mdxFilePath = join(POSTS_DIRECTORY, slug, "index.mdx"); + const mdxFilePath = join(POSTS_DIRECTORY, `${slug}.mdx`); // e.g. /Users/you/your-project/posts/hello-world/index.mdx const mdxDir = dirname(mdxFilePath);