Markdown In Astro 7

Astro 7 changes the default Markdown and MDX processor from unified to Sätteri.

Sätteri uses a Rust parser and JavaScript plugin layer. It is faster for large Markdown-heavy sites, but it is not a drop-in replacement for unified plugins.

Decision Table

Your ProjectRecommendation
Basic Markdown and MDXUse the default Sätteri pipeline
Uses GFM, smart punctuation, heading IDsTry Sätteri first; these are built in or covered by Astro defaults
Uses remark/rehype pluginsDecide whether to port or temporarily stay on unified
Uses recma pluginsStay on unified for now
Has custom MDX behaviorTest MDX output carefully after upgrade

Default Sätteri Configuration

You usually do not need to configure it. When you do, set the Markdown processor explicitly:

import { defineConfig } from 'astro/config';
import { satteri } from '@astrojs/markdown-satteri';

export default defineConfig({
  markdown: {
    processor: satteri({
      features: { gfm: false },
    }),
  },
});

Keep Unified When You Need Existing Plugins

If the site depends on existing remark, rehype, or recma plugins, keep unified while you migrate:

npm install @astrojs/markdown-remark
import { defineConfig } from 'astro/config';
import { unified } from '@astrojs/markdown-remark';
import remarkToc from 'remark-toc';

export default defineConfig({
  markdown: {
    processor: unified({
      remarkPlugins: [remarkToc],
    }),
  },
});

Gotcha: Sätteri’s AST shapes are familiar if you know MDAST/HAST, but its plugin API is not unified’s plugin API. Existing remark/rehype plugins do not run unmodified.

MDX Inherits Markdown Config

Astro’s MDX integration extends your Markdown configuration by default. Override processor in the MDX integration if .mdx needs different behavior from .md:

import { defineConfig } from 'astro/config';
import { satteri } from '@astrojs/markdown-satteri';
import mdx from '@astrojs/mdx';

export default defineConfig({
  markdown: {
    processor: satteri(),
  },
  integrations: [
    mdx({
      processor: satteri({ features: { directive: true } }),
    }),
  ],
});

Upgrade Strategy

Do this in order:

  1. Upgrade and run the build with Sätteri default.
  2. Compare rendered Markdown/MDX output on pages that use plugins.
  3. If output changes, switch to unified to unblock the upgrade.
  4. Port plugin behavior to Sätteri only when the performance win matters.