Skip to content

Commit 70a9f89

Browse files
committed
change to rehypeMdxImportMedia
1 parent db7e60b commit 70a9f89

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

next.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import createMDX from '@next/mdx'
22
import remarkMath from 'remark-math'
33
import rehypeKatex from 'rehype-katex'
4-
import remarkMdxImages from 'remark-mdx-images'
4+
import rehypeMdxImportMedia from 'rehype-mdx-import-media'
55

66
/** @type {import('next').NextConfig} */
77
const nextConfig = {
@@ -24,7 +24,7 @@ const nextConfig = {
2424
const withMDX = createMDX({
2525
// Add markdown plugins here, as desired
2626
options: {
27-
remarkPlugins: [remarkMath, remarkMdxImages],
27+
remarkPlugins: [remarkMath, rehypeMdxImportMedia],
2828
rehypePlugins: [rehypeKatex],
2929
},
3030
})

package-lock.json

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"react-dom": "^18.3.1",
4141
"react-icons": "^5.3.0",
4242
"rehype-katex": "^7.0.1",
43+
"rehype-mdx-import-media": "^1.2.0",
4344
"remark-math": "^6.0.0",
4445
"remark-mdx-images": "^3.0.0",
4546
"sharp": "^0.33.5"

0 commit comments

Comments
 (0)