AstroEco is Releasing…
Display your GitHub releases using astro-loader-github-releases
Minor Changes
-
#13952
de82ef2Thanks @ematipico! - Adds support for the experimental static headers Astro feature.When the feature is enabled via option
experimentalStaticHeaders, and experimental Content Security Policy is enabled, the adapter will generateResponseheaders for static pages, which allows support for CSP directives that are not supported inside a<meta>tag (e.g.frame-ancestors).import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ adapter: netlify({ experimentalStaticHeaders: true, }), experimental: { cps: true, }, });
Patch Changes
Major Changes
-
#13952
de82ef2Thanks @ematipico! - - The typeRedirectshas been renamed toHostRoutes.RouteDefinition.targetis now optionalRouteDefinition.weightis now optionalRedirects.printhas been removed. Now you need to passRedirectstype to theprintfunction
- redirects.print() + import { printAsRedirects } from "@astrojs/underscore-redirects" + printAsRedirects(redirects)
Minor Changes
-
#13952
de82ef2Thanks @ematipico! - Adds a new method calledcreateHostedRouteDefinition, which returns aHostRoutetype from aIntegrationResolvedRoute. -
#13952
de82ef2Thanks @ematipico! - Adds a new method calledprintAsRedirectsto printHostRoutesas redirects for the_redirectsfile.
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
- #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
🚨 Breaking Changes
- Upgrade from Astro 4.16 to Astro 5.7 and more - by @lin-stephanie in #25 (089b9)
🏡 Chore
- Update docs for Astro 5.7 upgrade - by @lin-stephanie (ef781)
View changes on GitHub
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
-
#13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
-
#13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE -
Updated dependencies []:
- @astrojs/underscore-redirects@0.6.1
Patch Changes
-
#13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE -
Updated dependencies [
c3e80c2]:- @astrojs/studio@0.1.9
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
Patch Changes
- #13720
e1cd1aeThanks @florian-lefebvre! - Fixes SSR renderer type
Patch Changes
- #13720
e1cd1aeThanks @florian-lefebvre! - Fixes SSR renderer type
Patch Changes
- #13720
e1cd1aeThanks @florian-lefebvre! - Fixes SSR renderer type
Patch Changes (aec3423)
- Update the entry Zod schema
- Resolve
<Content />becomes non-functional whenfetchThread: trueis set
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13663
a19a185Thanks @florian-lefebvre! - Improves type-safety of renderers
Patch Changes
- #13663
a19a185Thanks @florian-lefebvre! - Improves type-safety of renderers
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13663
a19a185Thanks @florian-lefebvre! - Improves type-safety of renderers
Patch Changes
-
#13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code -
Updated dependencies [
5dd2d3f]:- @astrojs/underscore-redirects@0.6.1
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
-
#13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code -
Updated dependencies [
5dd2d3f]:- @astrojs/underscore-redirects@0.6.1
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
Patch Changes
-
#13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code -
Updated dependencies [
5dd2d3f]:- @astrojs/studio@0.1.8
Patch Changes
- #3132
5959919Thanks @HiDeoo! - Fixes an issue where all border styles were not reset by the Starlight’s Tailwind compatibility package like in Tailwind base styles.
Patch Changes
- #13636
a9fd03fThanks @sarah11918! - Updates the wording for choosing the "minimal" starter template options
Major Changes
-
#2322
f14eb0cThanks @HiDeoo! -⚠️ BREAKING CHANGE: The minimum supported version of Starlight is now 0.34.0Please use the
@astrojs/upgradecommand to upgrade your project:npx @astrojs/upgrade
-
#2322
f14eb0cThanks @HiDeoo! - Adds support for Tailwind v4, drops support for Tailwind v3.⚠️ BREAKING CHANGE: Tailwind v3 is no longer supported. Tailwind v4 support in Astro is now provided using a Vite plugin and the Astro Tailwind integration is no longer required.-
Remove the Astro Tailwind integration. The Astro Tailwind integration is no longer required with Tailwind v4.
// astro.config.mjs import { defineConfig } from "astro/config"; import starlight from "@astrojs/starlight"; -import tailwind from "@astrojs/tailwind"; export default defineConfig({ integrations: [ starlight({ title: "Docs with Tailwind", customCss: ["./src/tailwind.css"], }), - tailwind({ applyBaseStyles: false }), ], }); -
Install Tailwind v4. Install the latest version of the
tailwindcssand@tailwindcss/vitepackages.Use the
astro add tailwindcommand to install and configure both packages:npx astro add tailwind
-
Update Tailwind base styles. Tailwind CSS base styles needs to be updated for Tailwind v4 and also to use Starlight Tailwind CSS.
/* src/tailwind.css */ -@tailwind base; -@tailwind components; -@tailwind utilities; +@layer base, starlight, theme, components, utilities; + +@import '@astrojs/starlight-tailwind'; +@import 'tailwindcss/theme.css' layer(theme); +@import 'tailwindcss/utilities.css' layer(utilities); + +@theme { + /* + Configure your Tailwind theme that will be used by Starlight. + https://starlight.astro.build/guides/css-and-tailwind/#styling-starlight-with-tailwind + */ +} + +/* +Add additional Tailwind styles to this file: +https://tailwindcss.com/docs/adding-custom-styles#using-custom-css +*/
-
Update Tailwind customizations. If you previously customized your Tailwind theme configuration in the
tailwind.config.mjsfile, such customizations are now defined through CSS using the@themeblock in your Tailwind base styles.-
Locate existing customizations in your
tailwind.config.mjsfile. The following example defines customizations for the accent colors, gray scale, and font families used by Starlight:// tailwind.config.mjs import starlightPlugin from '@astrojs/starlight-tailwind'; import colors from 'tailwindcss/colors'; /** @type {import('tailwindcss').Config} */ export default { content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], theme: { extend: { colors: { // Custom accent colors. accent: colors.fuchsia, // Custom gray scale. gray: colors.slate, }, fontFamily: { // Custom text font. sans: ['"Atkinson Hyperlegible"'], // Custom code font. mono: ['"IBM Plex Mono"'], }, }, }, plugins: [starlightPlugin()], };
-
The above customizations can be migrated to the new
@themeblock in the file containing your Tailwind base styles as follows:/* src/tailwind.css */ @layer base, starlight, theme, components, utilities; @import '@astrojs/starlight-tailwind'; @import 'tailwindcss/theme.css' layer(theme); @import 'tailwindcss/utilities.css' layer(utilities); @theme { /* Custom accent colors. */ --color-accent-50: var(--color-fuchsia-50); --color-accent-100: var(--color-fuchsia-100); --color-accent-200: var(--color-fuchsia-200); --color-accent-300: var(--color-fuchsia-300); --color-accent-400: var(--color-fuchsia-400); --color-accent-500: var(--color-fuchsia-500); --color-accent-600: var(--color-fuchsia-600); --color-accent-700: var(--color-fuchsia-700); --color-accent-800: var(--color-fuchsia-800); --color-accent-900: var(--color-fuchsia-900); --color-accent-950: var(--color-fuchsia-950); /* Custom gray scale. */ --color-gray-50: var(--color-slate-50); --color-gray-100: var(--color-slate-100); --color-gray-200: var(--color-slate-200); --color-gray-300: var(--color-slate-300); --color-gray-400: var(--color-slate-400); --color-gray-500: var(--color-slate-500); --color-gray-600: var(--color-slate-600); --color-gray-700: var(--color-slate-700); --color-gray-800: var(--color-slate-800); --color-gray-900: var(--color-slate-900); --color-gray-950: var(--color-slate-950); /* Custom text font. */ --font-sans: 'Atkinson Hyperlegible'; /* Custom code font. */ --font-mono: 'IBM Plex Mono'; }
-
We recommend checking your site’s appearance when upgrading to make sure there are no style regressions caused by this change.
For full details about upgrading from Tailwind v3 to v4, see the official upgrade guide.
-
Minor Changes
-
#2322
f14eb0cThanks @HiDeoo! - Groups all of Starlight's CSS declarations into a singlestarlightcascade layer.This change allows for easier customization of Starlight's CSS as any custom unlayered CSS will override the default styles. If you are using cascade layers in your custom CSS, you can use the
@layerCSS at-rule to define the order of precedence for different layers including the ones used by Starlight.We recommend checking your site’s appearance when upgrading to make sure there are no style regressions caused by this change.
-
#3122
3a087d8Thanks @delucis! - Removes defaultattrsandcontentvalues from head entries parsed using Starlight’s schema.Previously when adding
headmetadata via frontmatter or user config, Starlight would automatically add values forattrsandcontentif not provided. Now, these properties are leftundefined.This makes it simpler to add tags in route middleware for example as you no longer need to provide empty values for
attrsandcontent:head.push({ tag: 'style', content: 'div { color: red }' - attrs: {}, }); head.push({ tag: 'link', - content: '' attrs: { rel: 'me', href: 'https://example.com' }, });This is mostly an internal API but if you are overriding Starlight’s
Headcomponent or processing head entries in some way, you may wish to double check your handling ofAstro.locals.starlightRoute.headis compatible withattrsandcontentpotentially beingundefined. -
#3033
8c19678Thanks @delucis! - Adds support for generating clickable anchor links for headings.By default, Starlight now renders an anchor link beside headings in Markdown and MDX content. A new
<AnchorHeading>component is available to achieve the same thing in custom pages built using<StarlightPage>.If you want to disable this new Markdown processing set the
markdown.headingLinksoption in your Starlight config tofalse:starlight({ title: 'My docs', markdown: { headingLinks: false, }, }),
⚠️ BREAKING CHANGE: The minimum supported version of Astro is now v5.5.0.Please update Starlight and Astro together:
npx @astrojs/upgrade
-
#2322
f14eb0cThanks @HiDeoo! - Removes Shikicss-variablestheme fallback.⚠️ BREAKING CHANGE:Previously, Starlight used to automatically provide a fallback theme for Shiki, the default syntax highlighter built into Astro if the configured Shiki theme was not
github-dark.This fallback was only relevant when the default Starlight code block renderer, Expressive Code, was disabled and Shiki was used. Starlight no longer provides this fallback.
If you were relying on this behavior, you now manually need to update your Astro configuration to use the Shiki
css-variablestheme to match the previous behavior.import { defineConfig } from 'astro/config'; export default defineConfig({ + markdown: { + shikiConfig: { + theme: 'css-variables', + }, + }, });Additionally, you can use custom CSS to control the appearance of the code blocks. Here are the previously used CSS variables for the fallback theme:
:root { --astro-code-foreground: var(--sl-color-white); --astro-code-background: var(--sl-color-gray-6); --astro-code-token-constant: var(--sl-color-blue-high); --astro-code-token-string: var(--sl-color-green-high); --astro-code-token-comment: var(--sl-color-gray-2); --astro-code-token-keyword: var(--sl-color-purple-high); --astro-code-token-parameter: var(--sl-color-red-high); --astro-code-token-function: var(--sl-color-red-high); --astro-code-token-string-expression: var(--sl-color-green-high); --astro-code-token-punctuation: var(--sl-color-gray-2); --astro-code-token-link: var(--sl-color-blue-high); }
Patch Changes
Minor Changes
-
#3033
8c19678Thanks @delucis! - Adds support for generating clickable anchor links for headings.By default, the Starlight Markdoc preset now includes a default
headingnode, which renders an anchor link beside headings in your Markdoc content.If you want to disable this new feature, pass
headingLinks: falsein your Markdoc config:export default defineMarkdocConfig({ // Disable the default heading anchor link support extends: [starlightMarkdoc({ headingLinks: false })], });
⚠️ BREAKING CHANGE: The minimum supported peer version of Starlight is now v0.34.0.Please update Starlight and the Starlight Markdoc preset together:
npx @astrojs/upgrade
Minor Changes
-
#13527
2fd6a6bThanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
--- export const prerender = false; // Not needed with 'server' output const cart = await Astro.session.get('cart'); --- <a href="/checkout">🛒 {cart?.length ?? 0} items</a>
Configuring session storage
Sessions require a storage driver to store the data. The Node, Cloudflare and Netlify adapters automatically configure a default driver for you, but other adapters currently require you to specify a custom storage driver in your configuration.
If you are using an adapter that doesn't have a default driver, or if you want to choose a different driver, you can configure it using the
sessionconfiguration option:import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ adapter: vercel(), session: { driver: 'upstash', }, });
Using sessions
Sessions are available in on-demand rendered pages, API endpoints, actions and middleware.
In pages and components, you can access the session using
Astro.session:--- const cart = await Astro.session.get('cart'); --- <a href="/checkout">🛒 {cart?.length ?? 0} items</a>
In endpoints, actions, and middleware, you can access the session using
context.session:export async function GET(context) { const cart = await context.session.get('cart'); return Response.json({ cart }); }
If you attempt to access the session when there is no storage driver configured, or in a prerendered page, the session object will be
undefinedand an error will be logged in the console:--- export const prerender = true; const cart = await Astro.session?.get('cart'); // Logs an error. Astro.session is undefined ---
Upgrading from Experimental to Stable
If you were previously using the experimental API, please remove the
experimental.sessionflag from your configuration:import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ adapter: node({ mode: "standalone", }), - experimental: { - session: true, - }, });See the sessions guide for more information.
Minor Changes
-
#13578
406501aThanks @stramel! - The SVG import feature introduced behind a flag in v5.0.0 is no longer experimental and is available for general use.This feature allows you to import SVG files directly into your Astro project as components and inline them into your HTML.
To use this feature, import an SVG file in your Astro project, passing any common SVG attributes to the imported component.
--- import Logo from './path/to/svg/file.svg'; --- <Logo <Logo width={64} height={64} fill="currentColor" />
If you have been waiting for stabilization before using the SVG Components feature, you can now do so.
If you were previously using this feature, please remove the experimental flag from your Astro config:
import { defineConfig } from 'astro' export default defineConfig({ - experimental: { - svg: true, - } })Additionally, a few features that were available during the experimental stage were removed in a previous release. Please see the v5.6.0 changelog for details if you have not yet already updated your project code for the experimental feature accordingly.
Please see the SVG Components guide in docs for more about this feature.
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version -
Updated dependencies [
3752519,360cb91]:- @astrojs/studio@0.1.7
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
Patch Changes (981ee1a)
- Refactor first parameter type of exported
renderPostAsHtmlfrom PostView to RichTextProps - Update docs
Last fetched: | Scheduled refresh: Every Saturday
See Customizing GitHub Activity Pages to configure your own
Inspired by releases.antfu.me