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

推荐订阅源

博客园 - 【当耐特】
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Secure Thoughts
I
Intezer
TaoSecurity Blog
TaoSecurity Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Spread Privacy
Spread Privacy
A
About on SuperTechFans
NISL@THU
NISL@THU
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
S
SegmentFault 最新的问题
G
Google Developers Blog
B
Blog
N
News and Events Feed by Topic
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
V2EX - 技术
V2EX - 技术
V
Visual Studio Blog
MyScale Blog
MyScale Blog
Webroot Blog
Webroot Blog
Vercel News
Vercel News
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
S
Security Affairs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 叶小钗
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
T
Tailwind CSS Blog
F
Fortinet All Blogs
D
DataBreaches.Net
博客园 - Franky
博客园_首页
H
Heimdal Security Blog
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
Attack and Defense Labs
Attack and Defense Labs
Project Zero
Project Zero
雷峰网
雷峰网

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 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 Astro 5.2 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 6.2
Emanuele Stoppa, Matthew Phillips · 2026-04-30 · via The Astro Blog

Astro 6.2 is here! This release brings an experimental custom logger with built-in JSON output, perfect for structured logging and coding agents. It also includes a new SVG optimizer API, a font file URL helper, and more.

Explore what’s new in this release:

  • SVG optimizer
  • Experimental Logger
  • Experimental: getFontFileURL()
  • Astro v7 alpha
  • allowedHosts for preview servers
  • "jsx" option for compressHTML

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

SVG optimizer

Astro’s experimental SVG optimization has been redesigned with a new svgOptimizer option that replaces the previous svgo flag. Instead of being tied directly to SVGO, the new API introduces an SvgOptimizer interface that any optimization library can implement. Astro ships with a built-in svgoOptimizer() based on SVGO, but you can now swap in alternatives like OxVG.

import { defineConfig, svgoOptimizer } from "astro/config";

export default defineConfig({

experimental: {

svgOptimizer: svgoOptimizer()

}

});

When enabled, all imported SVG files used as components are optimized at build time for smaller file sizes and better performance. You can pass a SVGO configuration object to customize the optimization:

import { defineConfig, svgoOptimizer } from "astro/config";

export default defineConfig({

experimental: {

svgOptimizer: svgoOptimizer({

plugins: ["preset-default", { name: "removeViewBox" }]

})

}

});

If you were previously using experimental.svgo, update your config to use the new svgOptimizer option instead.

For more information, see the experimental SVG optimization docs.

Experimental Logger

It’s now possible to control the Astro logger with custom loggers. As part of the experimental feature, Astro ships with built-in loggers, such as a JSON logger. If you use coding agents to work with Astro, structured logs will definitely help your workflow.

JSON logger

You can enable JSON logging via configuration using experimental.logger, or via CLI using the flag --experimentalJson:

import { defineConfig, logHandlers } from "astro/config";

export default defineConfig({

experimental: {

logger: logHandlers.json()

}

})

astro dev --experimentalJson

astro sync --experimentalJson

astro build --experimentalJson

Custom logger

You can also create your own custom logger by implementing the correct interface:

import { defineConfig } from "astro/config";

export default defineConfig({

experimental: {

logger: {

entrypoint: "@org/custom-logger"

}

}

})

import type { AstroLoggerDestination, AstroLoggerMessage } from "astro";

import { matchesLevel } from "astro/logger";

function customLogger(level = 'info'): AstroLoggerDestination {

return {

write(message: AstroLoggerMessage) {

if (matchesLevel(message.level, level)) {

// write message somewhere

}

}

}

}

export default customLogger;

For more information on enabling and using this feature in your project, see the Experimental Logger docs.

For a complete overview and to give feedback on this experimental API, see the Custom logger RFC.

Experimental: getFontFileURL()

You can now load font file data during prerendering using the new experimental_getFontFileURL() helper exported from astro:assets. This makes it possible to use Astro-managed fonts with tools like Satori for generating Open Graph images at build time, something that previously required workarounds with undocumented internal paths.

import type { APIRoute } from "astro";

import { fontData, experimental_getFontFileURL } from "astro:assets";

import satori from "satori";

import { html } from "satori-html";

import sharp from "sharp";

export const GET: APIRoute = async (context) => {

const fontPath = fontData["--font-roboto"][0]?.src[0]?.url;

if (fontPath === undefined) {

throw new Error("Cannot find the font path.");

}

const url = experimental_getFontFileURL(fontPath, context.url);

const data = await fetch(url).then((res) => res.arrayBuffer());

const svg = await satori(

html`<div style="color: black;">hello, world</div>`,

{

width: 600,

height: 400,

fonts: [

{

name: "Roboto",

data,

weight: 400,

style: "normal",

},

],

},

);

const pngBuffer = await sharp(Buffer.from(svg))

.resize(600, 400)

.png()

.toBuffer();

return new Response(new Uint8Array(pngBuffer), {

headers: { "Content-Type": "image/png" },

});

};

For more information, see the Fonts API documentation.

Astro v7 alpha

Work on the next major version of Astro has begun. The first Astro 7 alpha includes two big changes:

Vite 8 support

Astro 7 upgrades to Vite 8, the latest major version of the build tool that powers Astro. This is a breaking change for Astro integrations and plugins that depend on Vite internals, but most Astro users should be able to upgrade without any changes to their project code.

Stable Rust compiler

The Rust-based Astro compiler, previously available as an experimental flag (experimental.rustCompiler), is now the default and only compiler in Astro 7. The Rust compiler delivers significantly faster build times compared to the previous Go-based compiler. The experimental.rustCompiler flag is no longer needed and can be removed from your config.

Try it out

The Astro 7 alpha is available for early testing:

We’d love to hear your feedback! Please report any issues you encounter on GitHub.

Other improvements

  • allowedHosts for preview servers: Astro’s server.allowedHosts option is now passed down to adapter preview servers, letting you control which hostnames are accepted when running astro preview behind a reverse proxy or with custom local domains. If you’re an adapter author, allowedHosts is now available on the options object passed to your preview entrypoint. See the adapter reference for details.
  • "jsx" option for compressHTML: The compressHTML option now accepts a "jsx" value that strips whitespace using JSX rules, so whitespace behaves the same way across .astro and .tsx files. Multi-line indented text is collapsed into a single line with spaces between words, while whitespace inside <pre> tags is preserved.

For a complete list of bug fixes and smaller improvements, see the full changelog.

The Astro core team is:

Alexander Niebuhr , Armand Philippot , Chris Swithinbank , Emanuele Stoppa , Erika , Florian Lefebvre , Fred Schott , HiDeoo , Luiz Ferraz , Matt Kane , Matthew Phillips , Reuben Tier , Sarah Rainsberger , and Yan Thomas .

Thanks to all the other contributors who helped make Astro 6.2 possible with code and docs additions and improvements, including:

AitorMT, Alejandro Romano, Alex Dombroski, Amar Reddy, Andreas Deininger, Aral Roca Gomez, BitToby, Bobo Chen (陳柏宏), ChrisLaRocque, Ciaran Moran, Daniel Zamyatin, Daniil Sivak, dataCenter430, Desel72, Ed Melly, Eveeifyeve, Felix Schneider, Felmon, fkatsuhiro, hank00111, Invictus Navarchus, James Murty, James Opstad, John L. Armstrong IV, Johnny Noble, junetpoint, Junseong Park, kimulaco, ld-web, Leif Marcus, Louis Escher, Martin DONADIEU, Martin Trapp, Mathieu Mafille, Matthias, Max Malkin, Maxim Slobodchikov, meyer, Milo, Misrilal, moktamd, ocavue, Peter Philipp, Pierre G., Rafael Yasuhide Sudo, randomguy-2650, Rayan Salhab, Roman, Ronan Berder, saif-at-scalekit, Sakku 🦉, Sebastian Beltran, Sebastien Barre, Shinya Fujino, Thomas Bonnet, tmimmanuel, Tobias Breit, travisBREAKS, ubutatu, vrabe, Will (liruifengv), and もっちー