File tree Expand file tree Collapse file tree 4 files changed +263
-1
lines changed
Expand file tree Collapse file tree 4 files changed +263
-1
lines changed Original file line number Diff line number Diff line change 11import createMDX from '@next/mdx'
22import type { NextConfig } from 'next'
3+ import rehypePrettyCode , { type Options } from 'rehype-pretty-code'
34
45const nextConfig : NextConfig = {
56 pageExtensions : [
@@ -15,6 +16,16 @@ const nextConfig: NextConfig = {
1516
1617const withMDX = createMDX ( {
1718 extension : / \. ( m d | m d x ) $ / ,
19+ options : {
20+ rehypePlugins : [
21+ [
22+ rehypePrettyCode ,
23+ {
24+ theme : 'one-dark-pro' ,
25+ } as Options ,
26+ ] ,
27+ ] ,
28+ } ,
1829} )
1930
2031export default withMDX ( nextConfig )
Original file line number Diff line number Diff line change 2020 "next" : " 15.3.5" ,
2121 "react" : " ^19.1.0" ,
2222 "react-dom" : " ^19.1.0" ,
23+ "rehype-pretty-code" : " ^0.14.1" ,
2324 "tailwind-merge" : " ^3.3.1"
2425 },
2526 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments