fix: improve mdx code block pipeline

This commit is contained in:
OpenCode Worker
2026-06-03 11:25:25 -05:00
parent 2a9a3f6550
commit d223c5f512
7 changed files with 8912 additions and 16 deletions

View File

@@ -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',
],
},