Skip to content

Commit

Permalink
fix(config/docs): mermaid diagrams not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
MFarabi619 committed Dec 2, 2024
1 parent 52c40bb commit 559a94a
Show file tree
Hide file tree
Showing 3 changed files with 464 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/docs-migration/source.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { remarkMermaid } from '@theguild/remark-mermaid'
import { defineConfig, defineDocs } from 'fumadocs-mdx/config'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
Expand All @@ -8,7 +9,7 @@ export const { docs, meta } = defineDocs({

export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkMath],
remarkPlugins: [remarkMath, remarkMermaid],
// Place it at first so that it won't be changed by syntax highlighter
rehypePlugins: v => [rehypeKatex, ...v],
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.5.2",
"@theguild/remark-mermaid": "^0.1.3",
"@types/mdx": "^2.0.13",
"@types/node": "22.8.6",
"@types/react": "^18.3.12",
Expand Down
Loading

0 comments on commit 559a94a

Please sign in to comment.