feat: support Github Flavored Markdown

This commit is contained in:
Henry Li
2026-01-30 16:41:18 +08:00
parent 05794e29d1
commit 1bb91bb267
6 changed files with 108 additions and 30 deletions

View File

@@ -0,0 +1,13 @@
import rehypeKatex from "rehype-katex";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import type { StreamdownProps } from "streamdown";
export const streamdownPlugins = {
remarkPlugins: [
[remarkGfm, [remarkMath, { singleDollarTextMath: true }]],
] as StreamdownProps["remarkPlugins"],
rehypePlugins: [
[rehypeKatex, { output: "html" }],
] as StreamdownProps["rehypePlugins"],
};