Skip to content

Commit 6cde363

Browse files
committed
Fix: renderer
1 parent 3fb9cfc commit 6cde363

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"date-fns": "^2.30.0",
1313
"framer-motion": "^10.18.0",
1414
"gray-matter": "^4.0.3",
15+
"gray-matter": "^4.0.3",
16+
"katex": "^0.16.10",
1517
"lucide-react": "^0.290.0",
1618
"next": "14.2.3",
1719
"react": "18.3.1",

src/lib/markdown.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export async function getProfileData() {
111111
.use(remarkGfm)
112112
.use(remarkMath)
113113
.use(remarkRehype, { allowDangerousHtml: true })
114-
.use(rehypeKatex, { strict: 'ignore', throwOnError: false })
114+
.use(rehypeKatex, { strict: 'ignore', trust: true, throwOnError: false })
115115
.use(rehypeHighlight)
116116
.use(rehypeSlug)
117117
.use(rehypeStringify)
@@ -152,6 +152,7 @@ export async function getPostData(slugArray: string[]) {
152152
.use(remarkRehype, { allowDangerousHtml: true })
153153
.use(rehypeKatex, {
154154
strict: 'ignore',
155+
trust: true, // Allow specialized environments
155156
throwOnError: false,
156157
errorColor: '#cc0000'
157158
})

0 commit comments

Comments
 (0)