wip: testing remark; trying to downgrade some libs

This commit is contained in:
2024-05-09 22:31:01 +10:00
parent cbcf6a731b
commit 0ca7a97d26
4 changed files with 48 additions and 6 deletions

21
app/mark/page.tsx Normal file
View File

@@ -0,0 +1,21 @@
import { MarkPostString } from '@/components/dummyPost';
import remarkGfm from "remark-gfm";
import rehypeSanitize from "rehype-sanitize";
import rehypeHighlight from "rehype-highlight";
import remarkRehype from "remark-rehype";
import remarkParse from "remark-parse";
import { unified } from 'unified';
import rehypeReact from "rehype-react";
import * as prod from 'react/jsx-runtime';
export default async function Mark() {
let content = await MarkPostString();
let result = unified()
.use(remarkParse)
.use(remarkGfm)
.use(remarkRehype)
.use(rehypeSanitize)
.use(rehypeHighlight)
.processSync(content)
}