AstroEco is Releasing…
Display your GitHub releases using astro-loader-github-releases

Patch Changes
- #14440
a3e16ab
Thanks @florian-lefebvre! - Fixes a case where the URLs generated by the experimental Fonts API would be incorrect in dev

Minor Changes
-
#14386
f75f446
Thanks @yanthomasdev! - Stabilizes the formerly experimentalgetActionState()
andwithState()
functions introduced in@astrojs/react
v3.4.0 used to integrate Astro Actions with React 19'suseActionState()
hook.This example calls a
like
action that accepts apostId
and returns the number of likes. Pass this action to thewithState()
function to apply progressive enhancement info, and apply touseActionState()
to track the result:import { actions } from 'astro:actions'; import { withState } from '@astrojs/react/actions'; import { useActionState } from 'react'; export function Like({ postId }: { postId: string }) { const [state, action, pending] = useActionState( withState(actions.like), 0, // initial likes ); return ( <form action={action}> <input type="hidden" name="postId" value={postId} /> <button disabled={pending}>{state} ❤️</button> </form> ); }
You can also access the state stored by
useActionState()
from your action handler. CallgetActionState()
with the API context, and optionally apply a type to the result:import { defineAction } from 'astro:actions'; import { z } from 'astro:schema'; import { getActionState } from '@astrojs/react/actions'; export const server = { like: defineAction({ input: z.object({ postId: z.string(), }), handler: async ({ postId }, ctx) => { const currentLikes = getActionState<number>(ctx); // write to database return currentLikes + 1; }, }), };
If you were previously using this experimental feature, you will need to update your code to use the new stable exports:
// src/components/Form.jsx import { actions } from 'astro:actions'; -import { experimental_withState } from '@astrojs/react/actions'; +import { withState } from '@astrojs/react/actions'; import { useActionState } from "react";
// src/actions/index.ts import { defineAction, type SafeResult } from 'astro:actions'; import { z } from 'astro:schema'; -import { experimental_getActionState } from '@astrojs/react/actions'; +import { getActionState } from '@astrojs/react/actions';

Minor Changes
-
#13520
a31edb8
Thanks @openscript! - Adds a new propertyroutePattern
available toGetStaticPathsOptions
This provides the original, dynamic segment definition in a routing file path (e.g.
/[...locale]/[files]/[slug]
) from the Astro render context that would not otherwise be available within the scope ofgetStaticPaths()
. This can be useful to calculate theparams
andprops
for each page route.For example, you can now localize your route segments and return an array of static paths by passing
routePattern
to a customgetLocalizedData()
helper function. Theparams
object will be set with explicit values for each route segment (e.g.locale
,files
, andslug)
. Then, these values will be used to generate the routes and can be used in your page template viaAstro.params
.// src/pages/[...locale]/[files]/[slug].astro import { getLocalizedData } from "../../../utils/i18n"; export async function getStaticPaths({ routePattern }) { const response = await fetch('...'); const data = await response.json(); console.log(routePattern); // [...locale]/[files]/[slug] // Call your custom helper with `routePattern` to generate the static paths return data.flatMap((file) => getLocalizedData(file, routePattern)); } const { locale, files, slug } = Astro.params;
For more information about this advanced routing pattern, see Astro's routing reference.
-
#13651
dcfbd8c
Thanks @ADTC! - Adds a newSvgComponent
typeYou can now more easily enforce type safety for your
.svg
assets by directly importingSVGComponent
fromastro/types
:--- // src/components/Logo.astro import type { SvgComponent } from 'astro/types'; import HomeIcon from './Home.svg'; interface Link { url: string; text: string; icon: SvgComponent; } const links: Link[] = [ { url: '/', text: 'Home', icon: HomeIcon, }, ]; ---
-
#14206
16a23e2
Thanks @Fryuni! - Warn on prerendered routes collision.Previously, when two dynamic routes
/[foo]
and/[bar]
returned values on theirgetStaticPaths
that resulted in the same final path, only one of the routes would be rendered while the other would be silently ignored. Now, when this happens, a warning will be displayed explaining which routes collided and on which path.Additionally, a new experimental flag
failOnPrerenderConflict
can be used to fail the build when such a collision occurs.
Patch Changes
-
#13811
69572c0
Thanks @florian-lefebvre! - Adds a newgetFontData()
method to retrieve lower-level font family data programmatically when using the experimental Fonts APIThe
getFontData()
helper function fromastro:assets
provides access to font family data for use outside of Astro. This can then be used in an API Route or to generate your own meta tags.import { getFontData } from 'astro:assets'; const data = getFontData('--font-roboto');
For example,
getFontData()
can get the font buffer from the URL when using satori to generate OpenGraph images:// src/pages/og.png.ts import type { APIRoute } from 'astro'; import { getFontData } from 'astro:assets'; import satori from 'satori'; export const GET: APIRoute = (context) => { const data = getFontData('--font-roboto'); const svg = await satori(<div style={{ color: 'black' }}>hello, world</div>, { width: 600, height: 400, fonts: [ { name: 'Roboto', data: await fetch(new URL(data[0].src[0].url, context.url.origin)).then((res) => res.arrayBuffer(), ), weight: 400, style: 'normal', }, ], }); // ... };
See the experimental Fonts API documentation for more information.

Minor Changes
-
#14430
78011ba
Thanks @ascorbic! - Adds support for async server renderingSvelte 5.36 added experimental support for async rendering. This allows you to use
await
in your components in several new places. This worked out of the box with client-rendered components, but server-rendered components needed some extra help. This update adds support for async server rendering in Svelte components used in Astro.To use async rendering, you must enable it in your Svelte config:
// svelte.config.js export default { compilerOptions: { experimental: { async: true, }, }, };
Then you can use
await
in your components:<script> let data = await fetch('/api/data').then(res => res.json()); </script> <h1>{data.title}</h1>
See the Svelte docs for more information on using
await
in Svelte components, including inside$derived
blocks and directly in markup.
Patch Changes

Patch Changes
-
#14409
250a595
Thanks @louisescher! - Fixes an issue whereastro info
would log errors to console in certain cases. -
#14398
a7df80d
Thanks @idawnlight! - Fixes an unsatisfiable type definition when callingaddServerRenderer
on an experimental container instance -
#13747
120866f
Thanks @jp-knj! - Adds automatic request signal abortion when the underlying socket closes in the Node.js adapterThe Node.js adapter now automatically aborts the
request.signal
when the client connection is terminated. This enables better resource management and allows applications to properly handle client disconnections through the standardAbortSignal
API. -
#14428
32a8acb
Thanks @drfuzzyness! - Force sharpService to return a Uint8Array if Sharp returns a SharedArrayBuffer -
#14411
a601186
Thanks @GameRoMan! - Fixes relative links to docs that could not be opened in the editor.

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3
- @astrojs/markdown-remark@6.3.7

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3
- @astrojs/underscore-redirects@1.0.0


Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3
- @astrojs/underscore-redirects@1.0.0

Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@6.3.7

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3

Patch Changes
- Updated dependencies [
1e2499e
]:- @astrojs/internal-helpers@0.7.3
- @astrojs/markdown-remark@6.3.7
Minor Changes
-
#3427
c3b2d0f
Thanks @delucis! - Fixes styling of labels that wrap across multiple lines in<Tabs>
component⚠️ Potentially breaking change: Tab labels now have a narrower line-height and additional vertical padding. If you have custom CSS targetting the<Tabs>
component, you may want to double check the visual appearance of your tabs when updating.If you want to preserve the previous styling, you can add the following custom CSS to your site:
.tab > [role='tab'] { line-height: var(--sl-line-height); padding-block: 0; }
-
#3380
3364af3
Thanks @HiDeoo! - Makes head entry parsing stricter in Starlight config and content frontmatter.⚠️ Potentially breaking change: Previously Starlight would accept a head entry for ameta
tag defining somecontent
which generates invalid HTML as<meta>
is a void element which cannot have any child nodes. Now, it is an error to define ameta
tag including somecontent
.If you see errors after updating, look for head entries in the Starlight configuration in the
astro.config.mjs
file or in the frontmatter of your content files that include acontent
property for ameta
tag. To fix the error, move thecontent
property to theattrs
object with at least an additional attribute to identify the kind of metadata it represents:head: { tag: 'meta', - content: 'foo', attrs: { name: 'my-meta', + content: 'foo', }, },
-
#3340
2018c31
Thanks @HiDeoo! - Adds missing vertical spacing between Markdown content and UI Framework components using client directives.⚠️ Potentially breaking change: By default, Starlight applies some vertical spacing (--sl-content-gap-y
) between Markdown content blocks. This change introduces similar spacing between Markdown content blocks and UI Framework components using client directives which was not present before.If you were relying on the previous behavior, you can manually override the spacing by manually specifying the top margin on the component using custom CSS, e.g. by relying on a CSS class to target the component.
.my-custom-component { margin-top: 0; }
Patch Changes

Patch Changes
- #14402
54dcd04
Thanks @FredKSchott! - Removes warning that caused unexpected console spam when using Bun

Minor Changes
-
#14285
bedc31b
Thanks @jdcolombo! - Adds a new configuration optionnamespaces
for more control over XML namespaces used in sitemap generationExcluding unused namespaces can help create cleaner, more focused sitemaps that are faster for search engines to parse and use less bandwidth. If your site doesn't have news content, videos, or multiple languages, you can exclude those namespaces to reduce XML bloat.
The
namespaces
option allows you to configurenews
,xhtml
,image
, andvideo
namespaces independently. All namespaces are enabled by default for backward compatibility and no change to existing projects is necessary. But now, you can choose to streamline your XML and avoid unnecessary code.For example, to exclude the video namespace from your sitemap, set
video: false
in your configuration:// astro.config.mjs import { sitemap } from '@astrojs/sitemap'; export default { integrations: [ sitemap({ namespaces: { video: false, // other namespaces remain enabled by default } }) ] };
The generated XML will not include the
xmlns:video
namespace:<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" > <!-- ... --> </urlset>

Minor Changes
-
#14204
d71448e
Thanks @Adammatthiesen! - Adds a new libSQL web driver to support environments that require a non-Node.js libSQL client such as Cloudflare or Deno. Also adds a newmode
configuration option to allow you to set your client connection type:node
(default) orweb
.The default db
node
driver mode is identical to the previous AstroDB functionality. No changes have been made to how AstroDB works in Node.js environments, and this is still the integration's default behavior. If you are currently using AstroDB, no changes to your project code are required and setting amode
is not required.However, if you have previously been unable to use AstroDB because you required a non-Node.js libSQL client, you can now install and configure the libSQL web driver by setting
mode: 'web'
in yourdb
configuration:import db from '@astrojs/db'; import { defineConfig } from 'astro/config'; // https://astro.build/config export default defineConfig({ integrations: [db({ mode: 'web' })], });
For more information, see the
@astrojs/db
documentation.
Patch Changes
-
#3416
fcc0633
Thanks @randomguy-2650! - Updates German UI translations to be more idiomatic. -
#1640
d1b3828
Thanks @hippotastic! - Refactors various internal systems, improving code quality and maintainability. -
#3421
97e8103
Thanks @andersk! - Removes an invalidvalue
attribute from the language and theme selectors -
#3422
9200fac
Thanks @andersk! - Refactors collapsible sidebar sections and “on this page” dropdown to use<span>
instead of<div>

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
-
#14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
-
#14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE

Patch Changes
- #14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE



Patch Changes
-
#14269
4823c42
Thanks @florian-lefebvre! - Updatescontext.netlify
to implement all its properties -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0

Patch Changes
-
9ecf359
Thanks @alexanderniebuhr! - Improves the image proxy endpoint when using the default compile option to adhere to user configuration regarding the allowed remote domains -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0


Patch Changes
- #14233
896886c
Thanks @gouravkhunger! - Fixes the issue with the optionlastmod
where if it is defined it applies correctly to<url>
entries in eachsitemap-${i}.xml
file but not the<sitemap>
entries in the rootsitemap-index.xml
file.


Patch Changes
-
#14259
02366e9
Thanks @ascorbic! - Removes warning when using the adapter with a static build.The Cloudflare adapter now has several uses outside of on-demand rendered pages, so this warning is misleading. Similar warnings have already been removed from other adapters.
-
#14234
15b55f3
Thanks @yanthomasdev! - Fixes an issue that could cause duplicate exports when configuringworkerEntrypoint.namedExports
-
#14240
77b18fb
Thanks @delucis! - Increases the minimum supported version of Astro to 5.7.0 -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0

Patch Changes
- Updated dependencies [
4d16de7
]:- @astrojs/internal-helpers@0.7.2

Patch Changes
- Updated dependencies [
4d16de7
]:- @astrojs/internal-helpers@0.7.2

Patch Changes
- Updated dependencies [
4d16de7
]:- @astrojs/internal-helpers@0.7.2
- @astrojs/markdown-remark@6.3.6

Patch Changes
- Updated dependencies [
4d16de7
]:- @astrojs/internal-helpers@0.7.2
- @astrojs/underscore-redirects@1.0.0

Patch Changes
4d16de7
Thanks @ematipico! - Improves the detection of remote paths in the_image
endpoint. Nowhref
parameters that start with//
are considered remote paths.

Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@6.3.6

Patch Changes
- Updated dependencies [
4d16de7
]:- @astrojs/internal-helpers@0.7.2

Patch Changes
5fc3c59
Thanks @ematipico! - Fixes a routing bug in standalone mode withtrailingSlash
set to"always"
.

Minor Changes
-
#13682
5824b32
Thanks @gouravkhunger! - Adds acustomSitemaps
option to include extra sitemaps in thesitemap-index.xml
file generated by Astro.This is useful for multi-framework setups on the same domain as your Astro site (
example.com
), such as a blog atexample.com/blog
whose sitemap is generated by another framework.The following example shows configuring your Astro site to include sitemaps for an externally-generated blog and help center along with the generated sitemap entries in
sitemap-index.xml
:Example:
import { defineConfig } from 'astro/config'; import sitemap from '@astrojs/sitemap'; export default defineConfig({ site: 'https://example.com', integrations: [ sitemap({ customSitemaps: [ 'https://example.com/blog/sitemap.xml', 'https://example.com/helpcenter/sitemap.xml', ], }), ], });
Learn more in the
@astrojs/sitemap
configuration documentation.

Patch Changes
- #14207
91283b5
Thanks @Adammatthiesen! - Fixes inferred types for Astro DB tables usingcolumn.text
fields.

Minor Changes
-
#14190
438adab
Thanks @Adammatthiesen! - Adds support for enum support for text columns in Astro DB tables.import { column, defineTable } from 'astro:db'; // Table definition const UserTable = defineTable({ columns: { id: column.number({ primaryKey: true }), name: column.text(), rank: column.text({ enum: ['user', 'mod', 'admin'] }), }, }); // Resulting type definition type UserTableInferInsert = { id: string; name: string; rank: 'user' | 'mod' | 'admin'; };

Minor Changes
-
#14188
e3422aa
Thanks @ascorbic! - Adds support for specifying a host to load prerendered error pagesBy default, if a user defines a custom error page that is prerendered, Astro will load it from the same host as the one that the request is made to. This change allows users to specify a different host for loading prerendered error pages. This can be useful in scenarios such as where the server is running behind a reverse proxy or when prerendered pages are hosted on a different domain.
To use this feature, set the
experimentalErrorPageHost
adapter option in your Astro configuration to the desired host URL. For example, if your server is running on localhost and served via a proxy, you can ensure the prerendered error pages are fetched via the localhost URL:import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ adapter: node({ // If your server is running on localhost and served via a proxy, set the host like this to ensure prerendered error pages are fetched via the localhost URL experimentalErrorPageHost: 'http://localhost:4321', }), });
For more information on enabling and using this experimental feature, see the
@astrojs/node
adapter docs.

Patch Changes
- #14186
9fe883e
Thanks @Adammatthiesen! - Fixes types for optional and primary key columns in Astro DB tables.

Patch Changes
- Updated dependencies [
0567fb7
]:- @astrojs/internal-helpers@0.7.1
- @astrojs/markdown-remark@6.3.5

Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@6.3.5


Patch Changes
- Updated dependencies [
0567fb7
]:- @astrojs/internal-helpers@0.7.1

Patch Changes
- Updated dependencies [
0567fb7
]:- @astrojs/internal-helpers@0.7.1

Last fetched: | Scheduled refresh: Every Saturday
See Customizing GitHub Activity Pages to configure your own
Inspired by releases.antfu.me