From 54c7452244edcea23b9603f7ddc8bc4ea118004c Mon Sep 17 00:00:00 2001 From: refansa Date: Sun, 4 Aug 2024 00:09:40 +0700 Subject: [PATCH] fix: get the root path with process.cwd() --- src/app/blog/[slug]/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx index 7d2554a..eb20764 100644 --- a/src/app/blog/[slug]/page.tsx +++ b/src/app/blog/[slug]/page.tsx @@ -8,7 +8,8 @@ import { notFound } from 'next/navigation' import { components } from '@/components/mdx-components' -const BLOG_PATH = path.join('src', 'contents', 'posts') +const ROOT_PATH = process.cwd() +const BLOG_PATH = path.join(ROOT_PATH, 'src', 'contents', 'posts') export interface Props { params: {