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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
[email protected]
Minor Changes
#13402
3e7b498Thanks @ematipico! - Adds a new experimental flag calledexperimental.preserveScriptOrderthat renders<script>and<style>tags in the same order as they are defined.When rendering multiple
<style>and<script>tags on the same page, Astro currently reverses their order in your generated HTML output. This can give unexpected results, for example CSS styles being overridden by earlier defined style tags when your site is built.With the new
preserveScriptOrderflag enabled, Astro will generate the styles in the order they are defined:For example, the following component has two
<style>tags, and both define the same style for thebodytag:Once the project is compiled, Astro will create an inline style where
yellowappears first, and thenred. Ultimately, theredbackground is applied:When
experimental.preserveScriptOrderis set totrue, the order of the two styles is kept as it is, and in the style generatedredappears first, and thenyellow:This is a breaking change to how Astro renders project code that contains multiple
<style>and<script>tags in the same component. If you were previously compensating for Astro's behavior by writing these out of order, you will need to update your code.This will eventually become the new default Astro behavior, so we encourage you to add this experimental style and script ordering as soon as you are able! This will help us test the new behavior and ensure your code is ready when this becomes the new normal.
For more information as this feature develops, please see the experimental script order docs.
#13352
cb886dcThanks @delucis! - Adds support for a newexperimental.headingIdCompatflagBy default, Astro removes a trailing
-from the end of IDs it generates for headings ending withspecial characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
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
rehypeHeadingIdsplugin directly, you can also pass this new option:#13311
a3327ffThanks @chrisirhc! - Adds a new configuration option for Markdown syntax highlightingexcludeLangsThis option provides better support for diagramming tools that rely on Markdown code blocks, such as Mermaid.js and D2 by allowing you to exclude specific languages from Astro's default syntax highlighting.
This option allows you to avoid rendering conflicts with tools that depend on the code not being highlighted without forcing you to disable syntax highlighting for other code blocks.
The following example configuration will exclude highlighting for
mermaidandmathcode blocks:Read more about this new option in the Markdown syntax highlighting configuration docs.
Patch Changes
#13404
4e78b4dThanks @ascorbic! - Fixes a bug in error handling that saving a content file with a schema error would display an "unhandled rejection" error instead of the correct schema error#13379
d59eb22Thanks @martrapp! - Fixes an edge case where the client router executed scripts twice when used with a custom swap function that only swaps parts of the DOM.#13393
6b8fdb8Thanks @renovate! - Updatesprimsjsto version 1.30.0, which adds support for more languages and fixes a security advisory which does not affect Astro.#13374
7b75bc5Thanks @ArmandPhilippot! - Fixes the documentation of the i18n configuration wheremanualwas presented as a key ofroutinginstead of an available value.#13380
9bfa6e6Thanks @martrapp! - Fixes an issue where astro:page-load fires before all scripts are executed#13407
0efdc22Thanks @ascorbic! - Displays correct error message when sharp isn't installedUpdated dependencies [
cb886dc,a3327ff]:@astrojs/[email protected]
Minor Changes
#13352
cb886dcThanks @delucis! - Adds support for a newexperimental.headingIdCompatflagBy default, Astro removes a trailing
-from the end of IDs it generates for headings ending withspecial characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
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
rehypeHeadingIdsplugin directly, you can also pass this new option:Patch Changes
cb886dc,a3327ff]:@astrojs/[email protected]
Minor Changes
#13352
cb886dcThanks @delucis! - Adds support for a newexperimental.headingIdCompatflagBy default, Astro removes a trailing
-from the end of IDs it generates for headings ending withspecial characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
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
rehypeHeadingIdsplugin directly, you can also pass this new option:Patch Changes
cb886dc,a3327ff]:@astrojs/[email protected]
Minor Changes
#13352
cb886dcThanks @delucis! - Adds support for a newexperimental.headingIdCompatflagBy default, Astro removes a trailing
-from the end of IDs it generates for headings ending withspecial characters. This differs from the behavior of common Markdown processors.
You can now disable this behavior with a new configuration flag:
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
rehypeHeadingIdsplugin directly, you can also pass this new option:#13311
a3327ffThanks @chrisirhc! - Adds a new configuration option for Markdown syntax highlightingexcludeLangsThis option provides better support for diagramming tools that rely on Markdown code blocks, such as Mermaid.js and D2 by allowing you to exclude specific languages from Astro's default syntax highlighting.
This option allows you to avoid rendering conflicts with tools that depend on the code not being highlighted without forcing you to disable syntax highlighting for other code blocks.
The following example configuration will exclude highlighting for
mermaidandmathcode blocks:Read more about this new option in the Markdown syntax highlighting configuration docs.