mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
27 lines
659 B
Markdown
27 lines
659 B
Markdown
---
|
|
'@astrojs/mdx': minor
|
|
---
|
|
|
|
Run heading ID injection after user plugins
|
|
|
|
⚠️ BREAKING CHANGE ⚠️
|
|
|
|
If you are using a rehype plugin that depends on heading IDs injected by Astro, the IDs will no longer be available when your plugin runs by default.
|
|
|
|
To inject IDs before your plugins run, import and add the `rehypeHeadingIds` plugin to your `rehypePlugins` config:
|
|
|
|
```diff
|
|
// astro.config.mjs
|
|
+ import { rehypeHeadingIds } from '@astrojs/markdown-remark';
|
|
import mdx from '@astrojs/mdx';
|
|
|
|
export default {
|
|
integrations: [mdx()],
|
|
markdown: {
|
|
rehypePlugins: [
|
|
+ rehypeHeadingIds,
|
|
otherPluginThatReliesOnHeadingIDs,
|
|
],
|
|
},
|
|
}
|
|
```
|