Releases: withastro/astro
[email protected]
[email protected]
[email protected]
[email protected]
Patch Changes
-
#12177
a4ffbfa
Thanks @matthewp! - Ensure we target scripts for execution in the routerUsing
document.scripts
is unsafe because if the application has aname="scripts"
this will shadow the built-indocument.scripts
. Fix is to usegetElementsByTagName
to ensure we're only grabbing real scripts. -
#12173
2d10de5
Thanks @ematipico! - Fixes a bug where Astro Actions couldn't redirect to the correct pathname when there was a rewrite involved.
[email protected]
[email protected]
Minor Changes
-
#12039
710a1a1
Thanks @ematipico! - Adds amarkdown.shikiConfig.langAlias
option that allows aliasing a non-supported code language to a known language. This is useful when the language of your code samples is not a built-in Shiki language, but you want your Markdown source to contain an accurate language while also displaying syntax highlighting.The following example configures Shiki to highlight
cjs
code blocks using thejavascript
syntax highlighter:import { defineConfig } from 'astro/config'; export default defineConfig({ markdown: { shikiConfig: { langAlias: { cjs: 'javascript', }, }, }, });
Then in your Markdown, you can use the alias as the language for a code block for syntax highlighting:
```cjs 'use strict'; function commonJs() { return 'I am a commonjs file'; } ```
-
#11984
3ac2263
Thanks @chaegumi! - Adds a newbuild.concurreny
configuration option to specify the number of pages to build in parallelIn most cases, you should not change the default value of
1
.Use this option only when other attempts to reduce the overall rendering time (e.g. batch or cache long running tasks like fetch calls or data access) are not possible or are insufficient.
Use this option only if the refactors are not possible. If the number is set too high, the page rendering may slow down due to insufficient memory resources and because JS is single-threaded.
[!WARNING]
This feature is stable and is not considered experimental. However, this feature is only intended to address difficult performance issues, and breaking changes may occur in a minor release to keep this option as performant as possible.// astro.config.mjs import { defineConfig } from 'astro'; export default defineConfig({ build: { concurrency: 2, }, });
Patch Changes
-
#12160
c6fd1df
Thanks @louisescher! - Fixes a bug whereastro.config.mts
andastro.config.cts
weren't reloading the dev server upon modifications. -
#12130
e96bcae
Thanks @thehansys! - Fixes a bug in the parsing ofx-forwarded-\*
Request
headers, where multiple values assigned to those headers were not correctly parsed.Now, headers like
x-forwarded-proto: https,http
are correctly parsed. -
#12147
9db755a
Thanks @ascorbic! - Skips setting statusMessage header for HTTP/2 responseHTTP/2 doesn't support status message, so setting this was logging a warning.
-
#12151
bb6d37f
Thanks @ematipico! - Fixes an issue whereAstro.currentLocale
wasn't incorrectly computed when thedefaultLocale
belonged to a custom locale path. -
Updated dependencies [
710a1a1
]:- @astrojs/[email protected]
@astrojs/[email protected]
@astrojs/[email protected]
Patch Changes
-
#12137
50dd88b
Thanks @ArmandPhilippot! - Fixes an error that occurred when the optionalpubDate
property was missing in an item. -
#12137
50dd88b
Thanks @ArmandPhilippot! - Fixes an error where docs incorrectly stated thetitle
,link
andpubDate
properties of RSS items was required.
@astrojs/[email protected]
Patch Changes
- Updated dependencies [
710a1a1
]:- @astrojs/[email protected]
@astrojs/[email protected]
Minor Changes
-
#12039
710a1a1
Thanks @ematipico! - Adds amarkdown.shikiConfig.langAlias
option that allows aliasing a non-supported code language to a known language. This is useful when the language of your code samples is not a built-in Shiki language, but you want your Markdown source to contain an accurate language while also displaying syntax highlighting.The following example configures Shiki to highlight
cjs
code blocks using thejavascript
syntax highlighter:import { defineConfig } from 'astro/config'; export default defineConfig({ markdown: { shikiConfig: { langAlias: { cjs: 'javascript', }, }, }, });
Then in your Markdown, you can use the alias as the language for a code block for syntax highlighting:
```cjs 'use strict'; function commonJs() { return 'I am a commonjs file'; } ```