Add the remark/rehype plugins you have installed above.
The code might be vary depending on your content source, here is an example for Fumadocs MDX:
import createMDX from 'fumadocs-mdx/config';import rehypeKatex from 'rehype-katex';import remarkMath from 'remark-math';const withMDX = createMDX({ mdxOptions: { remarkPlugins: [remarkMath], // Place it at first so that it won't be changed by rehype-pretty-code rehypePlugins: (v) => [rehypeKatex, ...v], },});