fix(satteri): route highlighted code blocks through MDX pre components#17341
Merged
Conversation
🦋 Changeset detectedLatest commit: 1b691ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 398 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Princesseuh
commented
Jul 9, 2026
| "@astrojs/internal-helpers": "workspace:*", | ||
| "@astrojs/prism": "workspace:*", | ||
| "github-slugger": "^2.0.0", | ||
| "hast-util-from-html": "^2.0.3", |
Member
Author
There was a problem hiding this comment.
This is very unfortunate because this dep has a fair amount of deps (10+), but Sätteri does not currently have an equivalent for this, though there's an open PR bruits/satteri#140
matthewp
reviewed
Jul 9, 2026
| // `mdx: true` wraps the highlighted HTML in a JSX `<Fragment set:html>` node | ||
| // rather than a raw HTML node, since the Sätteri pipeline is compiling to JSX. | ||
| hastPlugins.push(satteriHighlightPlugin(highlightFn, excludeLangs, { mdx: true })); | ||
| hastPlugins.push(satteriHighlightPlugin(highlightFn, excludeLangs)); |
Contributor
There was a problem hiding this comment.
Probably should add a comment here explaining why not to pass the arg so future-llm doesn't decide it's a good idea
Member
Author
There was a problem hiding this comment.
That argument doesn't exist anymore
matthewp
approved these changes
Jul 9, 2026
Merged
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixes #17340
This PR makes it so the Sätteri processor uses HAST for code blocks like the Unified pipeline does, leading the final MDX to render it using normal components instead of raw strings.
Testing
Added new tests and current ones should pass
Docs
N/A