Astro 5.2 brings Tailwind 4 integration, SEO enhancements, and new redirect features
The Astro Web Framework has announced version 5.2, the first minor update of 2025, introducing new features and enhancements. Key updates include the integration of Tailwind CSS 4 via the @tailwindcss/vite plugin, which simplifies its setup in Astro projects. This update marks the deprecation of the older @astrojs/tailwind integration. Additionally, SEO improvements have been made with automatic redirection of incorrect URLs to align with the trailingSlash setting in astro.config.mjs. It uses 301 redirects for GET requests and 308 for other methods.
Astro 5.2 also introduces external redirects, allowing users to define redirects to http or https URLs directly in the configuration and supports custom status codes when using an adapter. The update further supports TOML frontmatter in Markdown and MDX files, easing content migration from frameworks like Hugo.
Experimental features include the astro:config virtual module for consistent access to configuration settings and an option to disable React streaming in the @astrojs/react integration. The development experience is enhanced with error pages for incorrect trailing slashes, and numerous bug fixes have been implemented since version 5.1.
