Next.js 16 MDX Guide: @next/mdx, Frontmatter, and Custom Components in App Router (2026)
Set up MDX in Next.js 16 App Router the right way: install @next/mdx, register mdx-components.tsx, add Shiki highlighting with rehype-pretty-code, and know when to switch to next-mdx-remote/rsc for CMS-driven content.
