# Astro 7 didn't break my blog. It changed my quotes.

- Published: 2026-10-23
- Updated: 2026-12-01
- Tags: Astro, Tooling, Meta
- URL: https://devtrillo.com/writing/astro-7-mdx-blog-upgrade/

This blog has been on Astro 7 since June. `astro build` passes, the feed validates, nothing in the logs is red. Then I built every post twice, once with Astro 7's new Markdown processor and once with the old one, and diffed the HTML. One post on the live site renders a JavaScript empty string as `“”`.

The build didn't catch that. Neither did I, for four months.

<figure>
  _Image: A small black bird holds a magnifying glass over a page labeled 'Sätteri' where curly quotes are circled in red. Beside it, a man with glasses points at the same spot on a page labeled 'remark', circled around straight quotes. An orange arrow marked 'HTML diff' runs between the two stacks, under a blue note that reads 'build passed'._
  <figcaption>
    Same words, different quotes. Diff the HTML, not the build log.
  </figcaption>
</figure>

[Astro 7](https://astro.build/blog/astro-7/) changes more than its version number suggests. This post covers what changed for an MDX blog, the RSS import that broke the betas, and how I decided whether to keep the remark pipeline. Everything below was measured on this repo: `astro@7.0.9`, `@astrojs/mdx@7.0.3`, Vite 8.1.

## What changed for Markdown and MDX in Astro 7?

Four things matter if you write posts in Markdown or MDX:

1. **Sätteri is the default processor.** It's a Rust Markdown engine, and it replaces the unified pipeline (remark and rehype) that Astro has used since the start. GFM, smart punctuation, heading IDs, footnotes and math are built in.
2. **Your remark and rehype plugins stop running.** They don't error. If you still have `markdown.remarkPlugins` in your config, Astro warns that "your `satteri` processor doesn't run them" and builds anyway.
3. **The `.astro` compiler is Rust now**, and it no longer fixes broken HTML for you. A stray `</a>` that the Go compiler used to drop is now a build error.
4. **Vite 8 bundles with Rolldown**, which is stricter about imports than Rollup was. That's where the RSS break came from.

Point 2 is the one to worry about. A plugin that silently stops running looks exactly like a plugin that's still working, until someone reads the page.

## Which remark and rehype plugins does your blog depend on?

Before you pick a processor, list what your Markdown actually depends on:

```bash title="what does the pipeline do for you?"
grep -nE "remark|rehype|markdown" astro.config.*
grep -rlE "^\|.*\|$" src/content | wc -l   # GFM tables
grep -rl "\[\^" src/content | wc -l          # footnotes
```

On this blog the first grep returns nothing. No remark plugins, no rehype plugins. The posts lean on GFM tables, footnotes, heading IDs for the table of contents, and smart quotes, all of which Sätteri ships. Code blocks go through `astro-expressive-code`, and that kept working without a change.

If your grep does return plugins, check each one for a Sätteri version before you decide anything. Some integrations aren't there yet. [astro-mermaid](https://github.com/joesaby/astro-mermaid/issues/71) only registers its transform when the processor is unified, so on Sätteri your ` ```mermaid ` blocks render as plain code.

## Why does the RSS Container API import break in Astro 7?

The feed on this site has the full text of every post. To get that, the endpoint renders each MDX body with the Container API, and the Container API needs the MDX renderer:

```js title="src/pages/rss.xml.js" ins={2}
import rss from "@astrojs/rss";
import { getContainerRenderer } from "@astrojs/mdx/container-renderer";
import { experimental_AstroContainer as AstroContainer } from "astro/container";
import { loadRenderers } from "astro:container";

const container = await AstroContainer.create({
  renderers: await loadRenderers([getContainerRenderer()]),
});
```

Most examples online import `getContainerRenderer` from `"@astrojs/mdx"`, the package root. During the betas, that import broke the build. I pinned `astro@7.0.0-beta.3` and `@astrojs/mdx@7.0.0-beta.2` in a scratch copy of this repo, switched the import back to the root, and got the same failure as [withastro/astro#17068](https://github.com/withastro/astro/issues/17068):

```text title="astro build on 7.0.0-beta.3"
[ERROR] [vite] ✗ Build failed in 3.48s
[MISSING_EXPORT] "satteriCollectImagesPlugin" is not exported by
"__vite-optional-peer-dep:@astrojs/markdown-satteri:@astrojs/mdx".
   ╭─[ node_modules/@astrojs/mdx/dist/satteri/index.js:3:3 ]
```

The package root is the integration entry, the one meant for `astro.config`. Importing it from a page pulls in the whole Vite plugin. That plugin has a dynamic import of the Sätteri code path, and Rolldown follows dynamic imports while bundling. Sätteri was an optional peer that wasn't installed yet, so Vite handed back an empty stub and the named import failed.

The fix ([#17093](https://github.com/withastro/astro/pull/17093)) moved the renderer to its own entry point, `@astrojs/mdx/container-renderer`, and deprecated the old one. Astro 7.0.9 also depends on `@astrojs/markdown-satteri` directly now, so the stub doesn't come up anymore.

<Note>
  The old import still builds on 7.0.3. The deprecation warning prints on the
  same line as `/rss.xml`, in the middle of the route list, where nobody reads.
  Grep for it.
</Note>

```bash
grep -rn 'from "@astrojs/mdx"' src/
```

Anything outside `astro.config` that matches should import from `/container-renderer` instead. The old path will go away in a later major, and you'd rather move now than find out from a failed deploy.

## Should you keep remark or port to Sätteri?

If you need your unified plugins, you can keep them. Install `@astrojs/markdown-remark` and pass them to `unified()`:

```js title="astro.config.mjs"
import { unified } from "@astrojs/markdown-remark";

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

I had no plugins to keep, so the real question was whether the two processors render the same HTML. I built the site six times with each, alternating, and diffed the output.

| processor   | page generation, median of 6 | slower run    |
| ----------- | ---------------------------- | ------------- |
| Sätteri     | 8.0s                         | never         |
| `unified()` | 9.1s                         | all six pairs |

That's 49 pages on a laptop with other work running, so the spread was wide (6.3s to 16.5s). The direction never changed, though: remark was slower in every pair. On a blog this size it's a second. On the [1,558-post site in this upgrade write-up](https://lilting.ch/en/articles/astro-6-to-7-upgrade) it would add up.

Once I stripped out asset hashes and random component IDs, 15 pages still came out different. Most of it was noise: blank lines inside tables, and footnote attributes written as `data-footnote-ref="true"` instead of a bare `data-footnote-ref`. Browsers treat those as the same thing.

The quotes weren't noise. Smart punctuation is where the two engines disagree:

| source                                    | Sätteri                 | `unified()`             |
| ----------------------------------------- | ----------------------- | ----------------------- |
| `## "Works on my machine" is…`            | `“Works on my machine”` | `”Works on my machine”` |
| `<span>"The build is green"</span>` (JSX) | `“The build is green”`  | `”The build is green"`  |
| `<code>""</code>` (JSX)                   | `“”`                    | `""`                    |

Remark gets the opening quote wrong at the start of a heading and inside JSX text, and it leaves some quotes straight. Sätteri gets all of those right, but it curls the quotes inside a `<code>` element written as JSX. That's the decoder in [Let's build codebases that AI loves](/writing/lets-build-codebases-that-ai-loves/), and the live page shows the locale argument as `“”`. You can't paste that into a JavaScript file.

The fix is one line in the post. Pass the string as a JSX expression and the processor never sees it:

```mdx ins={2} del={1}
<code>""</code>
<code>{'""'}</code>
```

I checked it in the scratch copy: Sätteri leaves `""` straight once it's an expression.

> **Tip:** Markdown backticks are safe on both processors. The risk is a `<code>` tag
> you wrote by hand inside a component. Search for `<code>"` and `<code>'` in
> your `.mdx` files.

So I'm staying on Sätteri. Remark would fix one string, break four others, and build slower. If you depend on plugins with no Sätteri port, `unified()` is a fine place to wait, but run the same diff first. The old pipeline didn't render your posts the way you remember either.

## What should you check before upgrading an MDX blog to Astro 7?

For an Astro 6 blog with MDX:

1. `grep -nE "remark|rehype" astro.config.*`. For each plugin, find its Sätteri version or keep `unified()` for now.
2. `grep -rn 'from "@astrojs/mdx"' src/` and move every match outside the config to `@astrojs/mdx/container-renderer`.
3. Bump to Astro 7 and delete any `overrides` that pin Vite to 7. This repo had one. CI resolved Vite 8 regardless and failed with an SSR error that pointed nowhere near the pin.
4. Build, and fix the `.astro` files the Rust compiler rejects. They're real HTML bugs.
5. Build once on Sätteri and once on `unified()`, strip the asset hashes, and diff `dist/`. Read every line that has quotes in it.

Step 5 is the one nobody does, because the build already passed. It's also the only step that found anything wrong on this blog, and it took ten minutes.
