diff --git a/app/p/[slug]/page.tsx b/app/p/[slug]/page.tsx index 92e37db..4da5af9 100644 --- a/app/p/[slug]/page.tsx +++ b/app/p/[slug]/page.tsx @@ -12,6 +12,7 @@ import { notFound } from 'next/navigation'; import { Suspense, lazy } from 'react'; import rehypeSlug from 'rehype-slug'; import remarkGfm from 'remark-gfm'; +import { Post } from 'types'; const PostComment = lazy(() => import('components/post/post-comment')); @@ -34,7 +35,7 @@ const Page = async ({ return childLen ? prev + childLen + 1 : prev + 1; }; const tocLength = toc.reduce(calcLength, 0); - const mdxSource = await compileMDX({ + const mdxSource = await compileMDX({ source: post, options: { parseFrontmatter: true, @@ -53,9 +54,7 @@ const Page = async ({ return ( <>
- {/* @ts-expect-error Async Server Component */}

{mdxSource.frontmatter?.title}

- {/* @ts-expect-error Async Server Component */}