AstroEco is Releasing…
Display your GitHub releases using astro-loader-github-releases
Patch Changes
-
#3205
95d124aThanks @sgalcheung! - Fixes an issue preventing to use the<StarlightPage>component when thedocscontent collection that Starlight uses does not exist. -
#3206
e6ea584Thanks @HiDeoo! - Fixes a text selection issue for heading with a clickable anchor link when using double click to select text in Chrome and Safari. -
#3233
3064c40Thanks @torn4dom4n! - Updates Vietnamese UI translations. -
#3248
16c1239Thanks @HiDeoo! - Prevents icons in the<Card>component from being shrunk in some narrow viewports. -
#3225
21b93b8Thanks @randomguy-2650! - Updates German UI translations
Patch Changes
-
#13923
a9ac5edThanks @ematipico! - BREAKING CHANGE to the experimental Content Security Policy (CSP) onlyChanges the behavior of experimental Content Security Policy (CSP) to now serve hashes differently depending on whether or not a page is prerendered:
- Via the
<meta>element for static pages. - Via the
Responseheadercontent-security-policyfor on-demand rendered pages.
This new strategy allows you to add CSP content that is not supported in a
<meta>element (e.g.report-uri,frame-ancestors, and sandbox directives) to on-demand rendered pages.No change to your project code is required as this is an implementation detail. However, this will result in a different HTML output for pages that are rendered on demand. Please check your production site to verify that CSP is working as intended.
To keep up to date with this developing feature, or to leave feedback, visit the CSP Roadmap proposal.
- Via the
-
#13926
953a249Thanks @ematipico! - Adds a new Astro Adapter Feature calledexperimentalStaticHeadersto allow your adapter to receive theHeadersfor rendered static pages.Adapters that enable support for this feature can access header values directly, affecting their handling of some Astro features such as Content Security Policy (CSP). For example, Astro will no longer serve the CSP
<meta http-equiv="content-security-policy">element in static pages to adapters with this support.Astro will serve the value of the header inside a map that can be retrieved from the hook
astro:build:generated. Adapters can read this mapping and use their hosting headers capabilities to create a configuration file.A new field called
experimentalRouteToHeaderswill contain a map ofMap<IntegrationResolvedRoute, Headers>where theHeaderstype contains the headers emitted by the rendered static route.To enable support for this experimental Astro Adapter Feature, add it to your
adapterFeaturesin your adapter config:// my-adapter.mjs export default function createIntegration() { return { name: '@example/my-adapter', hooks: { 'astro:config:done': ({ setAdapter }) => { setAdapter({ name: '@example/my-adapter', serverEntrypoint: '@example/my-adapter/server.js', adapterFeatures: { experimentalStaticHeaders: true, }, }); }, }, }; }
See the Adapter API docs for more information about providing adapter features.
-
#13697
af83b85Thanks @benosmac! - Fixes issues with fallback route pattern matching wheni18n.routing.fallbackTypeisrewrite.- Adds conditions for route matching in
generatePathwhen building fallback routes and checking for existing translated pages
Now for a route to be matched it needs to be inside a named
[locale]folder. This fixes an issue whereroute.pattern.test()incorrectly matched dynamic routes, causing the page to be skipped.- Adds conditions for route matching in
findRouteToRewrite
Now the requested pathname must exist in
route.distURLfor a dynamic route to match. This fixes an issue whereroute.pattern.test()incorrectly matched dynamic routes, causing the build to fail. - Adds conditions for route matching in
-
#13924
1cd8c3bThanks @qw-in! - Fixes an edge case whereisPrerenderedwas incorrectly set tofalsefor static redirects. -
#13926
953a249Thanks @ematipico! - Fixes an issue where the experimental CSPmetaelement wasn't placed in the<head>element as early as possible, causing these policies to not apply to styles and scripts that came before themetaelement.
Patch Changes
-
#13919
423fe60Thanks @ematipico! - Fixes a bug where Astro added quotes to the CSP resources.Only certain resources require quotes (e.g.
'self'but nothttps://cdn.example.com), so Astro no longer adds quotes to any resources. You must now provide the quotes yourself for resources such as'self'when necessary:export default defineConfig({ experimental: { csp: { styleDirective: { resources: [ - "self", + "'self'", "https://cdn.example.com" ] } } } }) -
#13914
76c5480Thanks @ematipico! - BREAKING CHANGE to the experimental Content Security Policy feature onlyRemoves support for experimental Content Security Policy (CSP) when using the
<ClientRouter />component for view transitions.It is no longer possible to enable experimental CSP while using Astro's view transitions. Support was already unstable with the
<ClientRouter />because CSP required making its underlying implementation asynchronous. This caused breaking changes for several users and therefore, this PR removes support completely.If you are currently using the component for view transitions, please remove the experimental CSP flag as they cannot be used together.
import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { - csp: true } });Alternatively, to continue using experimental CSP in your project, you can consider migrating to the browser native View Transition API and remove the
<ClientRouter />from your project. You may be able to achieve similar results if you are not using Astro's enhancements to the native View Transitions and Navigation APIs.Support might be reintroduced in future releases. You can follow this experimental feature's development in the CSP RFC.
Patch Changes
-
#13899
7a1303dThanks @reknih! - Fix bug where error pages would return invalid bodies if the upstream response was compressed -
#13902
051bc30Thanks @arHSM! - Fixes a bug where vite virtual module ids were incorrectly added in the dev server -
#13905
81f71caThanks @jsparkdev! - Fixes wrong contents in CSP meta tag. -
#13907
8246bccThanks @martrapp! - Fixes a bug that caused view transition names to be lost. -
#13901
37fa0a2Thanks @ansg191! - fix fallback not being removed when server island is rendered
Minor Changes
-
#13802
0eafe14Thanks @ematipico! - Adds experimental Content Security Policy (CSP) supportCSP is an important feature to provide fine-grained control over resources that can or cannot be downloaded and executed by a document. In particular, it can help protect against cross-site scripting (XSS) attacks.
Enabling this feature adds additional security to Astro's handling of processed and bundled scripts and styles by default, and allows you to further configure these, and additional, content types. This new experimental feature has been designed to work in every Astro rendering environment (static pages, dynamic pages and single page applications), while giving you maximum flexibility and with type-safety in mind.
It is compatible with most of Astro's features such as client islands, and server islands, although Astro's view transitions using the
<ClientRouter />are not yet fully supported. Inline scripts are not supported out of the box, but you can provide your own hashes for external and inline scripts.To enable this feature, add the experimental flag in your Astro config:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { csp: true, }, });
For more information on enabling and using this feature in your project, see the Experimental CSP docs.
For a complete overview, and to give feedback on this experimental API, see the Content Security Policy RFC.
-
#13850
1766d22Thanks @ascorbic! - Provides a Markdown renderer to content loadersWhen creating a content loader, you will now have access to a
renderMarkdownfunction that allows you to render Markdown content directly within your loaders. It uses the same settings and plugins as the renderer used for Markdown files in Astro, and follows any Markdown settings you have configured in your Astro project.This allows you to render Markdown content from various sources, such as a CMS or other data sources, directly in your loaders without needing to preprocess the Markdown content separately.
import type { Loader } from 'astro/loaders'; import { loadFromCMS } from './cms'; export function myLoader(settings): Loader { return { name: 'my-loader', async load({ renderMarkdown, store }) { const entries = await loadFromCMS(); store.clear(); for (const entry of entries) { // Assume each entry has a 'content' field with markdown content store.set(entry.id, { id: entry.id, data: entry, rendered: await renderMarkdown(entry.content), }); } }, }; }
The return value of
renderMarkdownis an object with two properties:htmlandmetadata. These match therenderedproperty of content entries in content collections, so you can use them to render the content in your components or pages.--- import { getEntry, render } from 'astro:content'; const entry = await getEntry('my-collection', Astro.params.id); const { Content } = await render(entry); --- <Content />
For more information, see the Content Loader API docs.
-
#13887
62f0668Thanks @yanthomasdev! - Adds an option for integration authors to suppress adapter warning/errors insupportedAstroFeatures. This is useful when either an warning/error isn't applicable in a specific context or the default one might conflict and confuse users.To do so, you can add
suppress: "all"(to suppress both the default and custom message) orsuppress: "default"(to only suppress the default one):setAdapter({ name: 'my-astro-integration', supportedAstroFeatures: { staticOutput: 'stable', hybridOutput: 'stable', sharpImageService: { support: 'limited', message: "The sharp image service isn't available in the deploy environment, but will be used by prerendered pages on build.", suppress: 'default', }, }, });
For more information, see the Adapter API reference docs.
Patch Changes
-
#13817
b7258f1Thanks @yanthomasdev! - Clarifies and reduces a few logs when starting the dev server with@astrojs/cloudflare.Warnings about sharp support will now be suppressed when you have explicitly set an
imageServiceoption. -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
- #13679
4a8f193Thanks @moonclavedev! - Handle SVG images correctly in build image service
Patch Changes
-
#13877
5a7797fThanks @yuhang-dong! - Fixes a bug that causedAstro.rewriteto fail when used insequenced middleware -
#13872
442b841Thanks @isVivek99! - Fixes rendering of thedownloadattribute when it has a boolean value
Patch Changes
- #12529
485c2f0Thanks @apatel369! - Fixes an issue where installing Astro beta usingcreate-astrodisplays the wrong Astro version in the installation messages.
Patch Changes
- Updated dependencies [
03435f8]:- @astrojs/db@0.15.0
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@6.3.2
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Patch Changes
- Updated dependencies [
3c3b492]:- @astrojs/prism@3.3.0
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Patch Changes
- Updated dependencies [
3c3b492]:- @astrojs/prism@3.3.0
- @astrojs/markdown-remark@6.3.2
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Minor Changes
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
Patch Changes
-
#13799
7036b05Thanks @Lofty-Brambles! - Fixes an issue where the adapter didn't take into consideration theoutDirconfiguration. -
#13830
9371a67Thanks @Lofty-Brambles! - Fixes an issue with SVGs not rendering with image-cdn enabled, due to invalid source path parsing. -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
- #13507
660e83fThanks @TheOtterlord! - Handle errors where a module is not found when loading the server entrypoint
🚀 Features
- Integrate Giscus comments - by @lin-stephanie in #28 (fb951)
- Add
UI.postMetaStyleto set post metadata style ('minimal'for plain text,'icon'for icon-prefixed); hide modified date on mobile - by @lin-stephanie (29e8a)
🐞 Bug Fixes
- Missing shadow on mobile toc panel & docs error - by @lin-stephanie (1368d)
- Icon jitter when toggling code collapse - by @lin-stephanie (0ffec)
💅 Refactors
- Load medium-zoom only on post pages & format code - by @lin-stephanie (ae6d6)
🏡 Chore
- Update docs for Giscus and
UI.postMetaStyle- by @lin-stephanie (96cd0) - Update deps - by @lin-stephanie (14c02)
View changes on GitHub
Patch Changes
-
#13792
7910feaThanks @alexeyzimarev! - Unify imported images detection across adapters -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
-
#13792
7910feaThanks @alexeyzimarev! - Unify imported images detection across adapters -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
-
#13772
83193d4Thanks @Adammatthiesen! - Fix options parsing for the libsql client connection to ensure that proper values are being set when adding URLSearchParams to theASTRO_DB_REMOTE_URL -
#13783
1609044Thanks @Adammatthiesen! - Modify Database type to allow transactions to be properly typed now that Astro Studio has sunset.
Minor Changes
-
#13753
90293deThanks @mattyoho! - Customize the filenames of sitemap XML files generated by the@astro/sitemapintegration by settingfilenameBasein the integration configuration settings. This may be useful when deploying an Astro site at a path on a domain with preexisting sitemap files.Generated sitemap files will appear at
/sitemap-0.xmland/sitemap-index.xmlby default, which may conflict with preexisting files. SetfilenameBaseto a custom value to avoid that if so:import { defineConfig } from 'astro/config'; import sitemap from '@astrojs/sitemap'; export default defineConfig({ site: 'https://example.com', integrations: [ sitemap({ filenameBase: 'astronomy-sitemap', }), ], });
This will yield sitemap and index files as
https://example.com/astronomy-sitemap-0.xmlandhttps://example.com/astronomy-sitemap-index.xml.
Patch Changes
-
#3058
274cc06Thanks @techfg! - Fixes display of focus indicator around site title -
#3181
449c822Thanks @HiDeoo! - Fixes an issue where all headings in Markdown and MDX content were rendered with a clickable anchor link, even in non-Starlight pages. -
#3168
ca693feThanks @jsparkdev! - Updates Korean langage support with improvements and missing translations
Patch Changes
-
#3153
ea31f46Thanks @SuperKXT! - Fixes hover styles for highlighted directory in FileTree component. -
#2905
b5232bcThanks @HiDeoo! - Fixes a potential issue for projects with dynamic routes added by an user, an Astro integration, or a Starlight plugin where some styles could end up being missing. -
#3165
80a7871Thanks @KianNH! - IncreasesmaxBufferfor an internalspawnSync()call to support larger Git commit histories when using Starlight'slastUpdatedfeature. -
#3158
d1f3c8bThanks @heisenberg0924! - Adds Hungarian language support
Last fetched: | Scheduled refresh: Every Saturday
See Customizing GitHub Activity Pages to configure your own
Inspired by releases.antfu.me