Skip to content

Native Markdown / MDX parsing and processing#1364

Merged
Princesseuh merged 6 commits into
mainfrom
feat/satteri
Jun 15, 2026
Merged

Native Markdown / MDX parsing and processing#1364
Princesseuh merged 6 commits into
mainfrom
feat/satteri

Conversation

@Princesseuh

@Princesseuh Princesseuh commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Astro's Markdown pipeline is slow and heavy, I'd like to make it faster and smaller.

Replace Astro's default Markdown / MDX pipeline with Sätteri, a native (Rust) Markdown / MDX compiler, and add a pluggable markdown.processor config so users that depend on the remark / rehype ecosystem can opt back into it.

Links

Comment thread proposals/0061-native-markdown.md
Comment thread proposals/0061-native-markdown.md
Comment thread proposals/0056-native-markdown.md Outdated
Comment thread proposals/0056-native-markdown.md Outdated
Comment thread proposals/0056-native-markdown.md Outdated
Comment thread proposals/0056-native-markdown.md Outdated
Comment thread proposals/0056-native-markdown.md Outdated
Comment thread proposals/0061-native-markdown.md
Comment thread proposals/0056-native-markdown.md Outdated
@princemuel

Copy link
Copy Markdown

how would one access file.data?.astro?.frontmatter? or does sateri have its own api for that?

also here

const { Content, remarkPluginFrontmatter, ...rest } = await render(entry);

what's sateri's alternative for remarkPluginFrontmatter? or is it the same?

@Princesseuh

Copy link
Copy Markdown
Member Author

how would one access file.data?.astro?.frontmatter? or does sateri have its own api for that?

also here

const { Content, remarkPluginFrontmatter, ...rest } = await render(entry);

what's sateri's alternative for remarkPluginFrontmatter? or is it the same?

At this time Sätteri doesn't have an equivalent of that, I'm working on adding a data bag similar to file.data to support this usecase

dadezzz pushed a commit to dadezzz/university_notes that referenced this pull request Jun 1, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`6.3.8` → `6.4.2`](https://renovatebot.com/diffs/npm/astro/6.3.8/6.4.2) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/6.4.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/6.3.8/6.4.2?slim=true) |

---

### Release Notes

<details>
<summary>withastro/astro (astro)</summary>

### [`v6.4.2`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#642)

##### Patch Changes

- [#&#8203;16889](withastro/astro#16889) [`b94bcfd`](withastro/astro@b94bcfd) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Fixes a `plugins is not iterable` crash when using a pre-6.0 `@astrojs/mdx` alongside integrations (e.g. Starlight) that set `markdown.remarkPlugins`, `markdown.rehypePlugins`, or `markdown.remarkRehype`.

- [#&#8203;16878](withastro/astro#16878) [`b9f6bb9`](withastro/astro@b9f6bb9) Thanks [@&#8203;fkatsuhiro](https://github.com/fkatsuhiro)! - Fixes an issue where on-demand (SSR) dynamic routes would return 404 when a prerendered dynamic route with the same URL pattern was sorted first alphabetically. In production builds with `@astrojs/node` adapter, if `[a_prebuild].astro` (prerender=true) came before `[b_ssr].astro` alphabetically, requests to URLs not in the prerendered route's static paths would 404 instead of falling through to the SSR route. The fix adds fallthrough logic so that when a prerendered dynamic route matches but can't serve the request, Astro tries subsequent matching routes.

### [`v6.4.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#641)

##### Patch Changes

- [#&#8203;16883](withastro/astro#16883) [`eeb064c`](withastro/astro@eeb064c) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Restores the `astro/jsx/rehype.js` entry point so that older versions of `@astrojs/mdx` continue to work when used with Astro 6.x. This entry point will be removed in Astro 7.0.

### [`v6.4.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#640)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@6.4.0)

##### Minor Changes

- [#&#8203;16468](withastro/astro#16468) [`4cff3a1`](withastro/astro@4cff3a1) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Adds a new `preserveBuildServerDir` adapter feature

  Adapters can now set `preserveBuildServerDir: true` in their adapter features to keep the `dist/server/` directory structure for static builds, mirroring the existing `preserveBuildClientDir` option. This is useful for adapters that require a consistent `dist/client/` and `dist/server/` layout regardless of build output type.

  ```js
  setAdapter({
    name: 'my-adapter',
    adapterFeatures: {
      buildOutput,
      preserveBuildClientDir: true,
      preserveBuildServerDir: true,
    },
  });
  ```

- [#&#8203;16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@&#8203;Princesseuh](https://github.com/Princesseuh)! - Adds a new `markdown.processor` configuration option, allowing you to choose an alternative Markdown processor.

  Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.

  The default processor is `unified()`. This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { unified } from '@&#8203;astrojs/markdown-remark';
  import remarkToc from 'remark-toc';

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

  In addition to this new configuration option, Astro provides a new alternative processor based on Rust: [Sätteri](https://satteri.bruits.org/). You can choose to use it now by installing `@astrojs/markdown-satteri`, importing the `satteri()` processor, and adapting your existing configuration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { satteri } from '@&#8203;astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri({
        features: { directive: true },
      }),
    },
  });
  ```

  This processor does not support the remark and rehype plugins. This means you may need to convert them to [MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/) to retain your current functionality.

  The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but are now deprecated and will be removed in a future major update. The matching `remarkPlugins`, `rehypePlugins`, and `remarkRehype` options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto `unified({...})` (or your preferred plugin processor) :

  ```diff
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import remarkToc from 'remark-toc';
  import rehypeSlug from 'rehype-slug';
  + import { unified } from '@&#8203;astrojs/markdown-remark';

  export default defineConfig({
    markdown: {
  +    processor: unified({
  +      remarkPlugins: [remarkToc],
  +      rehypePlugins: [rehypeSlug],
  +      remarkRehype: true,
  +      gfm: true,
  +      smartypants: true,
  +    }),
  -    remarkPlugins: [remarkToc],
  -    rehypePlugins: [rehypeSlug],
  -    remarkRehype: true,
  -    gfm: true,
  -    smartypants: true,
    },
  });
  ```

  For more information on enabling and using this feature in your project, see our [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). To give feedback on this new Rust processor, see the [Native Markdown / MDX parsing and processing RFC](withastro/roadmap#1364).

##### Patch Changes

- [#&#8203;16468](withastro/astro#16468) [`4cff3a1`](withastro/astro@4cff3a1) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Skips the static preview server when an adapter provides its own `previewEntrypoint`, allowing the adapter to handle both static and dynamic routes

- [#&#8203;16811](withastro/astro#16811) [`e0e26db`](withastro/astro@e0e26db) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes `X-Forwarded-Host` and `X-Forwarded-Proto` headers being ignored when set in a custom `src/app.ts` fetch handler before creating `FetchState`

- [#&#8203;16468](withastro/astro#16468) [`4cff3a1`](withastro/astro@4cff3a1) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes the static preview server to respect `preserveBuildClientDir`, serving files from `build.client` instead of `outDir` when the adapter requires it

- [#&#8203;16770](withastro/astro#16770) [`1e2aa11`](withastro/astro@1e2aa11) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes a race condition where the Vite dep optimizer could lose React dependencies in dev mode when using Astro Actions

- [#&#8203;16468](withastro/astro#16468) [`4cff3a1`](withastro/astro@4cff3a1) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Exempts internal routes (e.g. server islands) from `getStaticPaths()` validation, fixing server island rendering on static sites

- [#&#8203;16468](withastro/astro#16468) [`4cff3a1`](withastro/astro@4cff3a1) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes preview for static sites that contain non-prerendered routes. Previously, the preview command ignored SSR routes discovered during route scanning and always used the static preview server.

- Updated dependencies \[[`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c)]:
  - [@&#8203;astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@&#8203;0.10.0
  - [@&#8203;astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@&#8203;7.2.0

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDQuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIwNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Comment thread proposals/0056-native-markdown.md Outdated
@Princesseuh

Copy link
Copy Markdown
Member Author

This proposal has now reached consensus and is accepted

@Princesseuh
Princesseuh merged commit 6edbc8f into main Jun 15, 2026
@Princesseuh
Princesseuh deleted the feat/satteri branch June 15, 2026 13:18
@princemuel

Copy link
Copy Markdown

At this time Sätteri doesn't have an equivalent of that, I'm working on adding a data bag similar to file.data to support this usecase

Is this ready yet? It's needed for cases like adding the reading time etc. And would remakPluginFrontMatter change to be a unified api for both sateri and unified?

Also, are you looking for contributors to the plugin?

@princemuel

Copy link
Copy Markdown

Nevermind. Just saw bruits/satteri#59

renovate Bot added a commit to gwennlbh/portfolio that referenced this pull request Jul 21, 2026
##### [v7.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#703)

##### Patch Changes

- [#17341](withastro/astro#17341) [`64b0d66`](withastro/astro@64b0d66) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes custom `pre` components not applying to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.
##### [v7.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#702)

##### Patch Changes

- Updated dependencies \[[`eb6f97e`](withastro/astro@eb6f97e)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.1
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.1
##### [v7.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#701)

##### Patch Changes

- [#17249](withastro/astro#17249) [`02b73b0`](withastro/astro@02b73b0) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the `peerDependencies` field used incorrect dependencies.
##### [v7.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#700)

##### Major Changes

- [#15819](withastro/astro#15819) [`cafec4e`](withastro/astro@cafec4e) Thanks [@delucis](https://github.com/delucis)! - Upgrade to Vite v8

##### Minor Changes

- [#17093](withastro/astro#17093) [`4585fe5`](withastro/astro@4585fe5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Replaces the import entrypoint of `getContainerRenderer()`

  A new `container-renderer` entrypoint exporting `getContainerRenderer()` has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.

  If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the `getContainerRenderer()` import for React:

  ```diff
  - import { getContainerRenderer } from '@astrojs/react';
  + import { getContainerRenderer } from '@astrojs/react/container-renderer';
  ```

  Importing `getContainerRenderer()` from the package root still works, but is now deprecated and logs a warning.

- [#17129](withastro/astro#17129) [`ff7b718`](withastro/astro@ff7b718) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for [modifying frontmatter programmatically](https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically) with the default Markdown processor.

  A Sätteri plugin can now read and mutate `ctx.data.astro.frontmatter`, and Astro uses the result as the page's frontmatter, in both Markdown and MDX.

##### Patch Changes

- [#17124](withastro/astro#17124) [`7e7ab87`](withastro/astro@7e7ab87) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates `satteri` to `0.9.0`. See the [Sätteri changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md) for details.

- [#17027](withastro/astro#17027) [`241250b`](withastro/astro@241250b) Thanks [@ocavue](https://github.com/ocavue)! - Triggers beta prereleases for packages that are still on alpha
##### [v6.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#603)

##### Patch Changes

- [#16969](withastro/astro#16969) [`4a31f90`](withastro/astro@4a31f90) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting `markdown.syntaxHighlight` to `'prism'` now highlights your code blocks with Prism.

  ```js
  // astro.config.mjs
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri(),
      syntaxHighlight: 'prism',
    },
  });
  ```
##### [v6.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#602)

##### Patch Changes

- [#16955](withastro/astro#16955) [`9a93d68`](withastro/astro@9a93d68) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates Sätteri processor to v0.8.0. See [its changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md#080--2026-06-03) for details on bugs fixed and features added.

- Updated dependencies \[[`9a93d68`](withastro/astro@9a93d68)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.2
##### [v6.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#601)

##### Patch Changes

- Updated dependencies \[[`eeb064c`](withastro/astro@eeb064c)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.1
##### [v6.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#600)

##### Major Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `markdown.processor` configuration option, allowing you to choose an alternative Markdown processor.

  Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.

  The default processor is `unified()`. This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { unified } from '@astrojs/markdown-remark';
  import remarkToc from 'remark-toc';

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

  In addition to this new configuration option, Astro provides a new alternative processor based on Rust: [Sätteri](https://satteri.bruits.org/). You can choose to use it now by installing `@astrojs/markdown-satteri`, importing the `satteri()` processor, and adapting your existing configuration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri({
        features: { directive: true },
      }),
    },
  });
  ```

  This processor does not support the remark and rehype plugins. This means you may need to convert them to [MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/) to retain your current functionality.

  The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but are now deprecated and will be removed in a future major update. The matching `remarkPlugins`, `rehypePlugins`, and `remarkRehype` options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto `unified({...})` (or your preferred plugin processor) :

  ```diff
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import remarkToc from 'remark-toc';
  import rehypeSlug from 'rehype-slug';
  + import { unified } from '@astrojs/markdown-remark';

  export default defineConfig({
    markdown: {
  +    processor: unified({
  +      remarkPlugins: [remarkToc],
  +      rehypePlugins: [rehypeSlug],
  +      remarkRehype: true,
  +      gfm: true,
  +      smartypants: true,
  +    }),
  -    remarkPlugins: [remarkToc],
  -    rehypePlugins: [rehypeSlug],
  -    remarkRehype: true,
  -    gfm: true,
  -    smartypants: true,
    },
  });
  ```

  For more information on enabling and using this feature in your project, see our [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). To give feedback on this new Rust processor, see the [Native Markdown / MDX parsing and processing RFC](withastro/roadmap#1364).

##### Minor Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for using [`@astrojs/markdown-satteri`](https://www.npmjs.com/package/@astrojs/markdown-satteri) to parse `.mdx` files.

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

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

  Note that the [`recmaPlugins` option](https://docs.astro.build/en/guides/integrations-guide/mdx/#recmaplugins) is not supported when using Sätteri as your MDX processor. If you would like to use Sätteri for Markdown files, but still use Unified for MDX, you can pass a different Markdown processor to the MDX integration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import mdx from '@astrojs/mdx';
  import { satteri } from '@astrojs/markdown-satteri';
  import { unified } from '@astrojs/markdown-remark';
  import myPlugin from './my-recma-plugin.js';

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

##### Patch Changes

- Updated dependencies \[[`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.0
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.0
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.0
##### [v5.0.6](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#506)

##### Patch Changes

- [#16579](withastro/astro#16579) [`49e10e3`](withastro/astro@49e10e3) Thanks [@igor-koop](https://github.com/igor-koop)! - Fixes an issue where the `smartypants` option was ignored.
##### [v5.0.5](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#505)

##### Patch Changes

- Updated dependencies \[[`9256345`](withastro/astro@9256345)]:
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.1.2
renovate Bot added a commit to gwennlbh/portfolio that referenced this pull request Jul 23, 2026
##### [v7.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#703)

##### Patch Changes

- [#17341](withastro/astro#17341) [`64b0d66`](withastro/astro@64b0d66) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes custom `pre` components not applying to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.
##### [v7.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#702)

##### Patch Changes

- Updated dependencies \[[`eb6f97e`](withastro/astro@eb6f97e)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.1
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.1
##### [v7.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#701)

##### Patch Changes

- [#17249](withastro/astro#17249) [`02b73b0`](withastro/astro@02b73b0) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the `peerDependencies` field used incorrect dependencies.
##### [v7.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#700)

##### Major Changes

- [#15819](withastro/astro#15819) [`cafec4e`](withastro/astro@cafec4e) Thanks [@delucis](https://github.com/delucis)! - Upgrade to Vite v8

##### Minor Changes

- [#17093](withastro/astro#17093) [`4585fe5`](withastro/astro@4585fe5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Replaces the import entrypoint of `getContainerRenderer()`

  A new `container-renderer` entrypoint exporting `getContainerRenderer()` has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.

  If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the `getContainerRenderer()` import for React:

  ```diff
  - import { getContainerRenderer } from '@astrojs/react';
  + import { getContainerRenderer } from '@astrojs/react/container-renderer';
  ```

  Importing `getContainerRenderer()` from the package root still works, but is now deprecated and logs a warning.

- [#17129](withastro/astro#17129) [`ff7b718`](withastro/astro@ff7b718) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for [modifying frontmatter programmatically](https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically) with the default Markdown processor.

  A Sätteri plugin can now read and mutate `ctx.data.astro.frontmatter`, and Astro uses the result as the page's frontmatter, in both Markdown and MDX.

##### Patch Changes

- [#17124](withastro/astro#17124) [`7e7ab87`](withastro/astro@7e7ab87) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates `satteri` to `0.9.0`. See the [Sätteri changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md) for details.

- [#17027](withastro/astro#17027) [`241250b`](withastro/astro@241250b) Thanks [@ocavue](https://github.com/ocavue)! - Triggers beta prereleases for packages that are still on alpha
##### [v6.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#603)

##### Patch Changes

- [#16969](withastro/astro#16969) [`4a31f90`](withastro/astro@4a31f90) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting `markdown.syntaxHighlight` to `'prism'` now highlights your code blocks with Prism.

  ```js
  // astro.config.mjs
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri(),
      syntaxHighlight: 'prism',
    },
  });
  ```
##### [v6.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#602)

##### Patch Changes

- [#16955](withastro/astro#16955) [`9a93d68`](withastro/astro@9a93d68) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates Sätteri processor to v0.8.0. See [its changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md#080--2026-06-03) for details on bugs fixed and features added.

- Updated dependencies \[[`9a93d68`](withastro/astro@9a93d68)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.2
##### [v6.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#601)

##### Patch Changes

- Updated dependencies \[[`eeb064c`](withastro/astro@eeb064c)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.1
##### [v6.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#600)

##### Major Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `markdown.processor` configuration option, allowing you to choose an alternative Markdown processor.

  Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.

  The default processor is `unified()`. This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { unified } from '@astrojs/markdown-remark';
  import remarkToc from 'remark-toc';

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

  In addition to this new configuration option, Astro provides a new alternative processor based on Rust: [Sätteri](https://satteri.bruits.org/). You can choose to use it now by installing `@astrojs/markdown-satteri`, importing the `satteri()` processor, and adapting your existing configuration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri({
        features: { directive: true },
      }),
    },
  });
  ```

  This processor does not support the remark and rehype plugins. This means you may need to convert them to [MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/) to retain your current functionality.

  The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but are now deprecated and will be removed in a future major update. The matching `remarkPlugins`, `rehypePlugins`, and `remarkRehype` options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto `unified({...})` (or your preferred plugin processor) :

  ```diff
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import remarkToc from 'remark-toc';
  import rehypeSlug from 'rehype-slug';
  + import { unified } from '@astrojs/markdown-remark';

  export default defineConfig({
    markdown: {
  +    processor: unified({
  +      remarkPlugins: [remarkToc],
  +      rehypePlugins: [rehypeSlug],
  +      remarkRehype: true,
  +      gfm: true,
  +      smartypants: true,
  +    }),
  -    remarkPlugins: [remarkToc],
  -    rehypePlugins: [rehypeSlug],
  -    remarkRehype: true,
  -    gfm: true,
  -    smartypants: true,
    },
  });
  ```

  For more information on enabling and using this feature in your project, see our [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). To give feedback on this new Rust processor, see the [Native Markdown / MDX parsing and processing RFC](withastro/roadmap#1364).

##### Minor Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for using [`@astrojs/markdown-satteri`](https://www.npmjs.com/package/@astrojs/markdown-satteri) to parse `.mdx` files.

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

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

  Note that the [`recmaPlugins` option](https://docs.astro.build/en/guides/integrations-guide/mdx/#recmaplugins) is not supported when using Sätteri as your MDX processor. If you would like to use Sätteri for Markdown files, but still use Unified for MDX, you can pass a different Markdown processor to the MDX integration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import mdx from '@astrojs/mdx';
  import { satteri } from '@astrojs/markdown-satteri';
  import { unified } from '@astrojs/markdown-remark';
  import myPlugin from './my-recma-plugin.js';

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

##### Patch Changes

- Updated dependencies \[[`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.0
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.0
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.0
##### [v5.0.6](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#506)

##### Patch Changes

- [#16579](withastro/astro#16579) [`49e10e3`](withastro/astro@49e10e3) Thanks [@igor-koop](https://github.com/igor-koop)! - Fixes an issue where the `smartypants` option was ignored.
##### [v5.0.5](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#505)

##### Patch Changes

- Updated dependencies \[[`9256345`](withastro/astro@9256345)]:
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.1.2
renovate Bot added a commit to gwennlbh/portfolio that referenced this pull request Jul 24, 2026
##### [v7.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#703)

##### Patch Changes

- [#17341](withastro/astro#17341) [`64b0d66`](withastro/astro@64b0d66) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes custom `pre` components not applying to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.
##### [v7.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#702)

##### Patch Changes

- Updated dependencies \[[`eb6f97e`](withastro/astro@eb6f97e)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.1
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.1
##### [v7.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#701)

##### Patch Changes

- [#17249](withastro/astro#17249) [`02b73b0`](withastro/astro@02b73b0) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the `peerDependencies` field used incorrect dependencies.
##### [v7.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#700)

##### Major Changes

- [#15819](withastro/astro#15819) [`cafec4e`](withastro/astro@cafec4e) Thanks [@delucis](https://github.com/delucis)! - Upgrade to Vite v8

##### Minor Changes

- [#17093](withastro/astro#17093) [`4585fe5`](withastro/astro@4585fe5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Replaces the import entrypoint of `getContainerRenderer()`

  A new `container-renderer` entrypoint exporting `getContainerRenderer()` has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.

  If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the `getContainerRenderer()` import for React:

  ```diff
  - import { getContainerRenderer } from '@astrojs/react';
  + import { getContainerRenderer } from '@astrojs/react/container-renderer';
  ```

  Importing `getContainerRenderer()` from the package root still works, but is now deprecated and logs a warning.

- [#17129](withastro/astro#17129) [`ff7b718`](withastro/astro@ff7b718) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for [modifying frontmatter programmatically](https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically) with the default Markdown processor.

  A Sätteri plugin can now read and mutate `ctx.data.astro.frontmatter`, and Astro uses the result as the page's frontmatter, in both Markdown and MDX.

##### Patch Changes

- [#17124](withastro/astro#17124) [`7e7ab87`](withastro/astro@7e7ab87) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates `satteri` to `0.9.0`. See the [Sätteri changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md) for details.

- [#17027](withastro/astro#17027) [`241250b`](withastro/astro@241250b) Thanks [@ocavue](https://github.com/ocavue)! - Triggers beta prereleases for packages that are still on alpha
##### [v6.0.3](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#603)

##### Patch Changes

- [#16969](withastro/astro#16969) [`4a31f90`](withastro/astro@4a31f90) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting `markdown.syntaxHighlight` to `'prism'` now highlights your code blocks with Prism.

  ```js
  // astro.config.mjs
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri(),
      syntaxHighlight: 'prism',
    },
  });
  ```
##### [v6.0.2](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#602)

##### Patch Changes

- [#16955](withastro/astro#16955) [`9a93d68`](withastro/astro@9a93d68) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updates Sätteri processor to v0.8.0. See [its changelog](https://github.com/bruits/satteri/blob/main/packages/satteri/CHANGELOG.md#080--2026-06-03) for details on bugs fixed and features added.

- Updated dependencies \[[`9a93d68`](withastro/astro@9a93d68)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.2
##### [v6.0.1](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#601)

##### Patch Changes

- Updated dependencies \[[`eeb064c`](withastro/astro@eeb064c)]:
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.1
##### [v6.0.0](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#600)

##### Major Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `markdown.processor` configuration option, allowing you to choose an alternative Markdown processor.

  Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.

  The default processor is `unified()`. This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { unified } from '@astrojs/markdown-remark';
  import remarkToc from 'remark-toc';

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

  In addition to this new configuration option, Astro provides a new alternative processor based on Rust: [Sätteri](https://satteri.bruits.org/). You can choose to use it now by installing `@astrojs/markdown-satteri`, importing the `satteri()` processor, and adapting your existing configuration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import { satteri } from '@astrojs/markdown-satteri';

  export default defineConfig({
    markdown: {
      processor: satteri({
        features: { directive: true },
      }),
    },
  });
  ```

  This processor does not support the remark and rehype plugins. This means you may need to convert them to [MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/) to retain your current functionality.

  The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but are now deprecated and will be removed in a future major update. The matching `remarkPlugins`, `rehypePlugins`, and `remarkRehype` options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto `unified({...})` (or your preferred plugin processor) :

  ```diff
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import remarkToc from 'remark-toc';
  import rehypeSlug from 'rehype-slug';
  + import { unified } from '@astrojs/markdown-remark';

  export default defineConfig({
    markdown: {
  +    processor: unified({
  +      remarkPlugins: [remarkToc],
  +      rehypePlugins: [rehypeSlug],
  +      remarkRehype: true,
  +      gfm: true,
  +      smartypants: true,
  +    }),
  -    remarkPlugins: [remarkToc],
  -    rehypePlugins: [rehypeSlug],
  -    remarkRehype: true,
  -    gfm: true,
  -    smartypants: true,
    },
  });
  ```

  For more information on enabling and using this feature in your project, see our [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). To give feedback on this new Rust processor, see the [Native Markdown / MDX parsing and processing RFC](withastro/roadmap#1364).

##### Minor Changes

- [#16848](withastro/astro#16848) [`f732f3c`](withastro/astro@f732f3c) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds support for using [`@astrojs/markdown-satteri`](https://www.npmjs.com/package/@astrojs/markdown-satteri) to parse `.mdx` files.

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

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

  Note that the [`recmaPlugins` option](https://docs.astro.build/en/guides/integrations-guide/mdx/#recmaplugins) is not supported when using Sätteri as your MDX processor. If you would like to use Sätteri for Markdown files, but still use Unified for MDX, you can pass a different Markdown processor to the MDX integration:

  ```js
  // astro.config.mjs
  import { defineConfig } from 'astro/config';
  import mdx from '@astrojs/mdx';
  import { satteri } from '@astrojs/markdown-satteri';
  import { unified } from '@astrojs/markdown-remark';
  import myPlugin from './my-recma-plugin.js';

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

##### Patch Changes

- Updated dependencies \[[`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c), [`f732f3c`](withastro/astro@f732f3c)]:
  - [@astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.10.0
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.2.0
  - [@astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.2.0
##### [v5.0.6](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#506)

##### Patch Changes

- [#16579](withastro/astro#16579) [`49e10e3`](withastro/astro@49e10e3) Thanks [@igor-koop](https://github.com/igor-koop)! - Fixes an issue where the `smartypants` option was ignored.
##### [v5.0.5](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#505)

##### Patch Changes

- Updated dependencies \[[`9256345`](withastro/astro@9256345)]:
  - [@astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@7.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants