feat: register Video component in MDXRemote
This commit is contained in:
@@ -7,6 +7,7 @@ import { MDXRemote } from "next-mdx-remote/rsc";
|
||||
import rehypePrettyCode from "rehype-pretty-code";
|
||||
import rehypeSlug from "rehype-slug";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import Video from "@/components/video";
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{ slug: string }>;
|
||||
@@ -63,6 +64,7 @@ export default async function Post({ params }: PageProps) {
|
||||
<div className="prose lg:prose-lg max-w-none">
|
||||
<MDXRemote
|
||||
source={postData.content}
|
||||
components={{ Video }}
|
||||
options={{
|
||||
mdxOptions: {
|
||||
remarkPlugins: [remarkGfm],
|
||||
|
||||
Reference in New Issue
Block a user