๐ Patch Changes
- #13505
a98ae5bThanks @ematipico! - Updates the dependencyviteto the latest.
a98ae5b Thanks @ematipico! - Updates the dependency vite to the latest.#13352 cb886dc Thanks @delucis! - Adds support for a new experimental.headingIdCompat flag
By default, Astro removes a trailing - from the end of IDs it generates for headings ending with
special characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
import { defineConfig } from 'astro/config';
export default defineConfig({ experimental: { headingIdCompat: true, },});This can be useful when heading IDs and anchor links need to behave consistently across your site and other platforms such as GitHub and npm.
If you are using the rehypeHeadingIds plugin directly, you can also pass this new option:
import { defineConfig } from 'astro/config';import { rehypeHeadingIds } from '@astrojs/markdown-remark';import { otherPluginThatReliesOnHeadingIDs } from 'some/plugin/source';
export default defineConfig({ markdown: { rehypePlugins: [ [rehypeHeadingIds, { experimentalHeadingIdCompat: true }], otherPluginThatReliesOnHeadingIDs, ], },});#13254 1e11f5e Thanks @p0lyw0lf! - Adds the ability to process and optimize remote images in Markdown syntax in MDX files.
Previously, Astro only allowed local images to be optimized when included using ![]() syntax. Astroโs image service could only display remote images without any processing.
Now, Astroโs image service can also optimize remote images written in standard Markdown syntax. This allows you to enjoy the benefits of Astroโs image processing when your images are stored externally, for example in a CMS or digital asset manager.
No additional configuration is required to use this feature! Any existing remote images written in Markdown will now automatically be optimized. To opt-out of this processing, write your images in Markdown using the JSX <img/> tag instead. Note that images located in your public/ folder are still never processed.
1e11f5e]:
db252e0]:
3d89e62]:
3a267f3 Thanks @bluwy! - Reverts https://github.com/withastro/astro/commit/9a3b48c5c3e8f597159454f06c5a0ce8e709bc50 which caused a regression for rendering inline MDX components and MDX files from content collections4f2fd0a Thanks @Princesseuh! - Fixes compatibility with Astro 5#12231 90ae100 Thanks @bluwy! - Handles the breaking change in Astro where content pages (including .mdx pages located within src/pages/) no longer respond with charset=utf-8 in the Content-Type header.
For MDX pages without layouts, @astrojs/mdx will automatically add the <meta charset="utf-8"> tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the <meta charset="utf-8"> tag.
If you require charset=utf-8 to render your page correctly, make sure that your layout components have the <meta charset="utf-8"> tag added.
#12008 5608338 Thanks @Princesseuh! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.
Starting from this release, no breaking changes will be introduced unless absolutely necessary.
To learn how to upgrade, check out the Astro v5.0 upgrade guide in our beta docs site.
#11741 6617491 Thanks @bluwy! - Updates adapter server entrypoint to use @astrojs/mdx/server.js
This is an internal change. Handling JSX in your .mdx files has been moved from Astro internals and is now the responsibility of this integration. You should not notice a change in your project, and no update to your code is required.
#12075 a19530e Thanks @bluwy! - Parses frontmatter ourselves
#11861 3ab3b4e Thanks @bluwy! - Updates @astrojs/markdown-remark and handle its breaking changes
#12533 1b61fdf Thanks @ematipico! - Fixes a case where the MDX renderer couldnโt be loaded when used as a direct dependency of an Astro integration.
Updated dependencies [3ab3b4e, 5608338, 560ef15, 83a2a64, 3ab3b4e, a19530e]:
1b61fdf Thanks @ematipico! - Fixes a case where the MDX renderer couldnโt be loaded when used as a direct dependency of an Astro integration.#12231 90ae100 Thanks @bluwy! - Handles the breaking change in Astro where content pages (including .mdx pages located within src/pages/) no longer respond with charset=utf-8 in the Content-Type header.
For MDX pages without layouts, @astrojs/mdx will automatically add the <meta charset="utf-8"> tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the <meta charset="utf-8"> tag.
If you require charset=utf-8 to render your page correctly, make sure that your layout components have the <meta charset="utf-8"> tag added.
710a1a1]: