Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion apps/web/components/layout/blog-layout.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import Head from "next/head";
import Image from "next/image";
import Link from "next/link";
import ReactMarkdown from "react-markdown";
import rehypeRaw from "rehype-raw";
import rehypeSanitize from "rehype-sanitize";
import remarkGfm from "remark-gfm";
import { ROUTES } from "../../data/routes.data";
import { BlogPost } from "../../pages/blog";
import { getImageUrl } from "../../utils/cms";
Expand Down Expand Up @@ -196,7 +199,16 @@ export default function BlogLayout({
) : null}

<div className="blog-content-override prose dark:prose-invert prose-indigo mx-auto mt-6">
<ReactMarkdown>{content}</ReactMarkdown>
<ReactMarkdown
rehypePlugins={[
rehypeRaw,
// @ts-ignore
rehypeSanitize({ tagNames: ["div", "iframe"] }),
remarkGfm,
]}
>
{content}
</ReactMarkdown>
</div>
</div>
</div>
Expand Down
Loading