fix: improve mdx code block pipeline
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { NextConfig } from 'next'
|
||||
import createMDX from '@next/mdx'
|
||||
|
||||
const mdxCodeBlockPipeline = new URL('./lib/mdx-hast-visitor.js', import.meta.url).pathname
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'export',
|
||||
trailingSlash: true,
|
||||
@@ -14,8 +16,7 @@ const withMDX = createMDX({
|
||||
'rehype-slug',
|
||||
['rehype-external-links', { target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer'] }],
|
||||
'rehype-autolink-headings',
|
||||
['rehype-pretty-code', { theme: { light: 'github-light', dark: 'github-dark-dimmed' }, keepBackground: false, grid: true }],
|
||||
'/mnt/blog/new-blog/lib/mdx-hast-visitor.js',
|
||||
mdxCodeBlockPipeline,
|
||||
'rehype-katex',
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user