feat: register Video component in MDXRemote

This commit is contained in:
2026-03-31 14:51:30 +02:00
parent aee0035a4f
commit 6ae23fb783

View File

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