Skip to content

feat(satteri): Add support for Prism highlighting#16969

Merged
Princesseuh merged 1 commit into
mainfrom
feat/satteri-prism
Jun 4, 2026
Merged

feat(satteri): Add support for Prism highlighting#16969
Princesseuh merged 1 commit into
mainfrom
feat/satteri-prism

Conversation

@Princesseuh

Copy link
Copy Markdown
Member

Changes

What the title says, it's easy enough, just needed hooking things up

Testing

Added / updated tests

Docs

N/A, I don't think we documented that it didn't work right now

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 859f189

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 48 packages
Name Type
@astrojs/markdown-satteri Minor
@astrojs/mdx Major
@test/astro-cloudflare Patch
@e2e/content-collections Patch
@e2e/csp-server-islands Patch
@e2e/preact-component Patch
@e2e/preact-lazy-component Patch
@e2e/react-component Patch
@e2e/server-islands Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch
@e2e/vue-component Patch
@performance/mdx Patch
@test/astro-assets-prefix Patch
@test/astro-basic Patch
@test/content-with-spaces-in-folder-name Patch
@test/content-collections-base Patch
@test/content-collections-mutation Patch
@test/content-collections Patch
@test/content-intellisense Patch
@test/content-layer-remark-plugins Patch
@test/content-layer Patch
@test/content-ssr-integration Patch
@test/content-static-paths-integration Patch
@test/content Patch
@test/core-image-deletion Patch
@test/core-image-svg Patch
@test/jsx-queue-rendering Patch
@test/partials Patch
@test/server-islands-ssr Patch
@test/slots-preact Patch
@test/slots-react Patch
@test/slots-solid Patch
@test/slots-svelte Patch
@test/slots-vue Patch
@test/special-chars-in-component-imports Patch
@test/tailwindcss Patch
@test/astro-cloudflare-prerender-styles Patch
@test/astro-cloudflare-vite-plugin Patch
@test/content-layer-rendering Patch
@test/mdx-css-head-mdx Patch
@test/image-remark-imgattr Patch
@test/mdx-astro-container-escape Patch
@test/mdx-frontmatter-injection Patch
@example/blog Patch
@example/with-mdx Patch
@example/with-tailwindcss Patch
astro-benchmark Patch

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

@github-actions github-actions Bot added feat: markdown Related to Markdown (scope) pkg: integration Related to any renderer integration (scope) labels Jun 4, 2026
Comment on lines +6 to +7
/** @deprecated Renamed to `satteriHighlightPlugin` (it drives both Shiki and Prism). */
createHighlightPlugin as satteriShikiPlugin,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a changeset for the new API and the deprecation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not intended to be public I think, I hesitated and then saw that it was only us using it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. So maybe we could add @internal too?

@Princesseuh
Princesseuh merged commit 4a31f90 into main Jun 4, 2026
25 checks passed
@Princesseuh
Princesseuh deleted the feat/satteri-prism branch June 4, 2026 09:06
This was referenced Jun 4, 2026
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

feat: markdown Related to Markdown (scope) pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants