diff --git a/app/(app)/articles/[slug]/page.tsx b/app/(app)/articles/[slug]/page.tsx
index 88a8f58d..614e9f6e 100644
--- a/app/(app)/articles/[slug]/page.tsx
+++ b/app/(app)/articles/[slug]/page.tsx
@@ -14,10 +14,11 @@ import ArticleAdminPanel from "@/components/ArticleAdminPanel/ArticleAdminPanel"
import { type Metadata } from "next";
import { getPost } from "@/server/lib/posts";
import { getCamelCaseFromLower } from "@/utils/utils";
-import { generateHTML } from "@tiptap/html";
+import { generateHTML } from "@tiptap/core";
import { TiptapExtensions } from "@/components/editor/editor/extensions";
import DOMPurify from "isomorphic-dompurify";
import type { JSONContent } from "@tiptap/core";
+import NotFound from "@/components/NotFound/NotFound";
type Props = { params: { slug: string } };
@@ -119,11 +120,17 @@ const ArticlePage = async ({ params }: Props) => {
{isTiptapContent ? (
,
+ }}
className="tiptap-content"
/>
) : (
- {renderedContent}
+
+ {Markdoc.renderers.react(renderedContent, React, {
+ components: markdocComponents,
+ })}
+
)}
{post.tags.length > 0 && (
diff --git a/package-lock.json b/package-lock.json
index fa5fb01c..37e073df 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -99,6 +99,7 @@
"@svgr/webpack": "^8.1.0",
"@tailwindcss/typography": "^0.5.13",
"@types/chance": "^1.1.6",
+ "@types/dompurify": "^3.0.5",
"@types/node": "^22.7.5",
"@types/nodemailer": "^6.4.15",
"@types/pg": "^8.11.5",
@@ -8634,7 +8635,6 @@
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz",
"integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==",
- "license": "MIT",
"dependencies": {
"@types/trusted-types": "*"
}
diff --git a/package.json b/package.json
index b687eea3..96a67dd0 100644
--- a/package.json
+++ b/package.json
@@ -117,6 +117,7 @@
"@svgr/webpack": "^8.1.0",
"@tailwindcss/typography": "^0.5.13",
"@types/chance": "^1.1.6",
+ "@types/dompurify": "^3.0.5",
"@types/node": "^22.7.5",
"@types/nodemailer": "^6.4.15",
"@types/pg": "^8.11.5",