Paul Krill
Editor at Large

Astro boosts HTML file control, i18n support

news
Feb 5, 20242 mins

Astro 4.3 web framework improves control over HTML file output and adds experimental domain support for international locations.

retro astronauts with rocket on planet
Credit: Thinkstock

Another update to the Astro web framework for content-driven websites has arrived. Only weeks since the release of Astro 4.2, Astro 4.3 brings more control over HTML file output and adds experimental domain support for different international (i18n) locales.

Astro 4.3 was introduced February 1. Developers can upgrade Astro using the following command:

npx @astrojs/upgrade

More control over HTML file output is enabled by a new build.format option, called preserve, that offers more control over the resulting HTML files in a production build. This option will preserve file system structure and ensure it is mirrored over to production. The feature offers better compatibility with some web servers with strict requirements on structuring of files.

Astro 4.3 also adds an experimental domains i18n configuration, for specifying different domains or subdomains for different supported locales. Developers, for example, now could use example.com for an English site, fr.example.com for a French site, and example.es for a Spanish site. Developers can enable the experimental flag, i18nDomains, and map locales to domains using i18.domains in the astro.config.mjs file.

In other improvements in Astro 4.3, the framework adds a ComponentProps type export from Astro/types to get the props type of an Astro component. This type export allows developers to reference the Props accepted by another component, even if that component does not export the Props type directly.

Finally, the standard ![](img.png) now can be used in Markdown files for images colocated in the same folder, with no relative specifier required. Astro 4.3 release notes can be found on GitHub.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author