Dashboardbyk.github.ioAstro 7 mdx() remarkPlugins silently ig…

Astro 7 mdx() remarkPlugins silently ignored — use markdown.processor unified()

Category: gotcha
Confidence: 1.00
ID: 019f84dc-34a6-7693-bc0b-a53b0f8bc5dd
Project ID: 27022d30-10a9-49e4-8a75-dae8ea101609
Cross-project: No
Recalled in other projects: 0
Source session: 1H6zthdbm2YTrMQ2H
Created: 2026-07-21 13:27:31
Updated: 2026-07-21 13:27:31

Content

In Astro 7, passing remarkPlugins directly to the mdx() integration (e.g. mdx({ remarkPlugins: [...] })) is deprecated AND silently broken: Astro 7's new default markdown processor 'Sätteri' replaces unified, and @astrojs/mdx's isSatteriProcessor code path only forwards gfm/smartypants from processor.options.features — not remarkPlugins/rehypePlugins/remarkRehype. Trap: it looks safe because .mdx files use their own unified/@mdx-js pipeline (unaffected by Sätteri, which only changes plain .md handling), so the plugin appears correctly wired but simply never executes — causing silent data loss (e.g. data.astro.frontmatter.X never populated, no error thrown). Fix: install @astrojs/markdown-remark explicitly as a direct dependency and configure markdown: { processor: unified({ remarkPlugins: [...] }) } at the top level of astro.config instead of via the mdx() integration options.

Move to: