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 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],
|
||||||
|
|||||||
Reference in New Issue
Block a user