惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
爱范儿
爱范儿
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
B
Blog RSS Feed
博客园 - 聂微东
G
GRAHAM CLULEY
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Scott Helme
Scott Helme
AI
AI
S
Security Affairs
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
AWS News Blog
AWS News Blog
T
Threatpost
Cyberwarzone
Cyberwarzone
www.infosecurity-magazine.com
www.infosecurity-magazine.com
U
Unit 42
V
Vulnerabilities – Threatpost
J
Java Code Geeks
博客园 - Franky
月光博客
月光博客
Blog — PlanetScale
Blog — PlanetScale
NISL@THU
NISL@THU
D
Docker
小众软件
小众软件
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
A
Arctic Wolf
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
Forbes - Security
Forbes - Security
量子位
PCI Perspectives
PCI Perspectives
美团技术团队
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
有赞技术团队
有赞技术团队
腾讯CDC
P
Proofpoint News Feed
S
Security @ Cisco Blogs
G
Google Developers Blog
C
Cisco Blogs

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13 What's new in Astro - July 2025 Astro 5.12 Starlight 0.35 Astro 5.11 What's new in Astro - June 2025 Live Content Collections: A Deep Dive Introducing… Astro Mart Astro Solstice Festival Astro 5.10 Astro 5.9 What's new in Astro - May 2025 Astro 5.8 What's new in Astro - April 2025 2025 Technical Steering Committee Starlight April Update Astro 5.7 Astro Agency Partner Program Astro 5.6 What's new in Astro - March 2025 Astro 5.5 What's new in Astro - February 2025 Astro 5.4 Starlight 0.32 Astro 5.3 What's new in Astro - January 2025 2024 year in review What's new in Astro - December 2024 Astro 5.1 Astro 5.0 Google IDX: Our Official Online Editor Partner What's new in Astro - November 2024 What's new in Astro - October 2024 Astro x Cloudinary SDK What's new in Astro - September 2024 Community Loaders for Astro Content Layer Astro x Hygraph: Content Loader Astro x Cloudinary: Content Loader Astro x Storyblok: Content Loader Content Layer: A Deep Dive Starlight 0.28 Astro 5.0 Beta Release The $100,000 Astro Ecosystem Fund Fall Update Goodbye Studio, Hello DB What's new in Astro - August 2024 Astro 4.15 Astro 4.14 Astro 4.13 What's new in Astro - July 2024 Astro 4.12: Server Islands Netlify: Our Official Deployment Partner What's new in Astro - June 2024 Astro 4.11 Astro Together 2024 Server Islands The Astro Content Layer Zero-JavaScript View Transitions Astro 4.10 Starlight turns one year old! What's new in Astro - May 2024 Astro 4.9 Astro 4.8 What's new in Astro - April 2024 Astro 4.7 Astro 4.6 What's new in Astro - March 2024 Migrating 500+ tests from Mocha to Node.js Astro DB: A Deep Dive The Astro Developer Portal Astro DB Astro 4.5
Astro 5.2
Matt Kane, Emanuele Stoppa, Florian Lefebvre · 2025-01-30 · via The Astro Blog

Astro 5.2 is now available! The first minor release of 2025 includes Tailwind 4 support, a new way to access config values in your pages, better trailing slash handling, and support for external redirects.

It’s still January, so make it your resolution to try out these new features:

  • Tailwind 4 support
  • Trailing slash redirects
  • External redirects
  • TOML frontmatter in Markdown
  • Experimental: astro:config
  • Experimental: disable React streaming

To upgrade an existing project, use the automated @astrojs/upgrade CLI tool. Alternatively, upgrade manually by running the upgrade command for your package manager:

# Recommended:

npx @astrojs/upgrade

# Manual:

npm install astro@latest

pnpm upgrade astro --latest

yarn upgrade astro --latest

Tailwind 4 support

With their release of v4, Tailwind CSS now offers a @tailwindcss/vite plugin that can be directly added to your Astro project. This simplifies the Tailwind experience in Astro and is now the recommended way to use Tailwind 4 in Astro.

Astro 5.2 adds native support for this Vite plugin, and the astro add tailwind command will now add the plugin to your Astro config and create a default CSS file that imports Tailwind styles.

As a result, the @astrojs/tailwind integration is now deprecated but will continue to work for older versions of Tailwind. To upgrade to Tailwind 4, please uninstall the integration and either use the updated astro add tailwind command or follow the Tailwind documentation for manual installation.

Thanks to Eveeifyeve who did the first work on supporting Tailwind 4 while it was in alpha, even though this ended up using a different implementation.

Trailing slash redirects

Whether or not a path should have a trailing slash is a common debate in web development. However, everyone agrees that it should be consistent. Duplicate content is bad for SEO and confusing for users.

Astro has long allowed you to configure whether routes should be matched with or without trailing slash, but previously this has meant returning a “not found” page for the incorrect path or leaving it up to the host to handle conflicts. Astro 5.2 will automatically redirect your on-demand rendered routes to the correct path according to the trailingSlash option in your astro.config.mjs.

Now, it doesn’t matter whether your visitor navigates to /about/, /about, or even /about///. In production, they’ll always end up on the correct page. For GET requests, the redirect will be a 301 (permanent) redirect, and for all other request methods, it will be a 308 (permanent, and preserve the request method) redirect.

During development, Astro will display an error page instead of redirecting to help you catch any misconfigurations and bad links.

To enable trailing slash redirects, set the trailingSlash option in your astro.config.mjs:

export default defineConfig({

adapter: node({ mode: 'standalone' }),

trailingSlash: 'never', // or 'always'

});

For more information, see the trailingSlash documentation.

External redirects

Astro now supports defining external redirects to http or https destinations straight from the configuration.

Just like with internal redirects available since Astro 2.9, with an adapter you can also provide an object as the value. This allows you to specify a status code in addition to the new destination.

import {defineConfig} from "astro/config"

export default defineConfig({

redirects: {

"/about": "https://example.com/about",

"/news": {

status: 302,

destination: "https://example.com/news"

}

}

})

See the updated redirects configuration docs for more details.

TOML frontmatter in Markdown

Astro’s excellent support for Markdown and MDX has always included the YAML frontmatter, whether in file exports or content collections. With this release, Astro now also supports TOML frontmatter in both. This is useful for adding existing content files with TOML frontmatter to your project from another framework such as Hugo, or you may just prefer TOML over YAML!

No configuration is required to use TOML frontmatter in your content files: just use +++ to delimit the frontmatter and Astro will parse it as TOML.

+++

date = 2025-01-30

title = 'Use TOML frontmatter in Astro!'

[params]

author = 'Houston'

+++

# Support for TOML frontmatter is here!

Thanks to Colin Bate who contributed this feature.

Experimental: astro:config

Astro provides several ways to access your configuration settings from your project files: environment variables, the Astro global object in .astro files, and the context variable in middleware and endpoints. But, it can be hard to remember where the information is available: was it import.meta.env.BASE or Astro.base?

With astro:config, we want to provide a single way to read the most useful configuration options from anywhere inside your project. And, because it’s Astro, we’re doing it with type-safety in mind!

This virtual module exposes two submodules (/client and /server) for accessing different subsets of your configuration values. This protects your information by only making some data available to the client.

To use this new virtual module, you need to enable it via experimental flag:

import {defineConfig} from "astro/config"

export default defineConfig({

trailingSlash: "always",

experimental: {

serializeConfig: true

}

})

Then, from any file inside the Astro project, you can use the virtual module:

import {trailingSlash} from "astro:config/client"

export function appendForwardPath(path) {

if (trailingSlash === "always") {

return path.endsWith("/") ? path : path + "/"

}

return path

}

Refer to the Serialized Configuration docs for more information regarding this new experimental feature.

We want to eventually deprecate the other ways of reading these properties, and make astro:config the de facto standard for accessing your configuration values in your Astro project. Please join the active discussion to leave your feedback in the Serialized Config RFC and help shape the future of this feature!

Experimental: disable React streaming

The @astrojs/react integration now allows you to disable React streaming. This can be useful if you are using a library that is not compatible with streaming, such as many CSS-in-JS libraries. To disable React streaming, upgrade the @astrojs/react integration:

# Recommended:

npx @astrojs/upgrade

# Manual:

npm install @astrojs/react@latest

pnpm upgrade @astrojs/react --latest

yarn upgrade @astrojs/react --latest

Then set the integration’s experimentalDisableStreaming option to true in your astro.config.mjs:

export default defineConfig({

integrations: [

react({

experimentalDisableStreaming: true,

}),

],

});

See the @astrojs/react documentation for more information.

Thanks to Arturo Silva from the Washington Post who contributed this feature.

Bug fixes

We’ve had loads of bug fixes since the 5.1 release. See the changelog for all the details.

Thanks

Thanks to everyone who contributed to this release, including Arturo Silva, Colin Bate, Sarah Rainsberger, Matthew Phillips, HiDeoo, Bjorn Lu, Armand Philippot, Yan Thomas, and many more.

We’re excited to see what you build with Astro 5.2!