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

推荐订阅源

H
Heimdal Security Blog
A
Arctic Wolf
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs
D
Docker
爱范儿
爱范儿
T
Tenable Blog
C
Check Point Blog
B
Blog
C
Cisco Blogs
Vercel News
Vercel News
The Cloudflare Blog
T
Threatpost
NISL@THU
NISL@THU
T
Tor Project blog
V2EX - 技术
V2EX - 技术
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
博客园 - 司徒正美
S
Security @ Cisco Blogs
GbyAI
GbyAI
S
Secure Thoughts
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Cloudbric
Cloudbric
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
Y
Y Combinator Blog
博客园_首页
T
Troy Hunt's Blog
The Hacker News
The Hacker News
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
U
Unit 42
AWS News Blog
AWS News Blog
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell

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 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 5.12
Matt Kane · 2025-07-17 · via The Astro Blog

⚽ Astro 5.12 knocks it into the back of the net, with an upgraded Netlify dev experience, TOML support in content loaders, and more!

The starting lineup includes:

  • TOML support for content loaders
  • New Netlify dev experience
  • Experimental raw environment values

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

TOML support for content loaders

Astro 5.12 brings native support for TOML files in content collections. Astro’s file() and glob() content loaders have had you covered for Markdown, JSON, and YAML files, and now you can use TOML files as well.

There’s no configuration needed to enable TOML support: just add .toml files to a collection using a built-in loader. For example, if you have a directory of TOML files like this:

name = "Apollo"

launch_date = "1969-07-16"

crew = ["Neil Armstrong", "Buzz Aldrin", "Michael Collins"]

You can then create a content collection that includes the TOML files:

import { defineCollection, z } from 'astro:content';

import { glob } from 'astro/loaders';

const spacecraft = defineCollection({

loader: glob({ pattern: '*.toml', base: './src/content/spacecraft' }),

schema: z.object({

name: z.string(),

launch_date: z.coerce().date(),

crew: z.array(z.string()),

}),

});

export const collections = { spacecraft };

You can then access the TOML content in your Astro components:

---

import { getCollection } from 'astro:content';

const spacecraft = await getCollection('spacecraft');

---

<ul>

{

spacecraft.map((item) => (

<li>

<h2>{item.name}</h2>

<p>Launch Date: {item.launch_date.toLocaleDateString()}</p>

<p>Crew: {item.crew.join(', ')}</p>

</li>

))

}

</ul>

New Netlify dev experience

The Netlify adapter is now powered by Netlify’s very own Vite plugin during development, bringing Netlify’s entire platform and primitives to your local dev environment!

The power of Netlify on localhost

Until now, using Netlify primitives with Astro during local development required running your project through the Netlify CLI. The new adapter embeds these capabilities directly into Astro’s dev server instead.

After upgrading to the latest version of the adapter, running astro dev will provide:

Configuring dev features

Along with these features comes a way to configure them. The Netlify adapter now accepts a devFeatures option in its configuration to customize which features are enabled during development. Currently, the features you can configure are:

  • images: Enables the local Netlify Image CDN for Astro images during dev. Defaults to true.
  • environmentVariables: Automatically populates your development server with environment variables from your linked Netlify site. Defaults to false.

You pass this as an option to the Netlify adapter in your Astro configuration file:

import { defineConfig } from 'astro/config'

import netlify from '@astrojs/netlify'

export default defineConfig({

adapter: netlify({

devFeatures: {

environmentVariables: true,

images: false,

},

})

})

Now you can enjoy the rich Netlify flavor in your own home!

Thanks to Eduardo Bouças and chee rabbits from Netlify who contributed this feature. Extra thanks to chee who contributed to this post too.

Experimental raw environment values

A new experimental configuration option allows you to opt out of Astro’s automatic type coercion for environment variable values in import.meta.env. By default, Astro converts string values like "true", "false", "1", and "0" to their respective types, but this can be unexpected since environment variables are generally expected to be strings.

This aligns Astro’s behavior with Vite’s handling of environment variables, and is likely to become the default in a future major release.

To enable this feature, add the rawEnvValues flag to your Astro configuration:

export default defineConfig({

experimental: {

rawEnvValues: true,

},

});

This experimental option only affects the import.meta.env object and doesn’t impact the astro:env module that powers Astro’s type-safe environment variables.

Thanks to Adam Langbert who contributed this feature.

Bug fixes

As always, we’ve been working hard on fixing issues since the 5.11 release. See the changelog for all the details.

The Astro core team is:

Alexander Niebuhr , Ben Holmes , Caleb Jasik , Chris Swithinbank , Emanuele Stoppa , Erika , Florian Lefebvre , Fred Schott , Fuzzy , HiDeoo , Luiz Ferraz , Matt Kane , Matthew Phillips , Nate Moore , Reuben Tier , Sarah Rainsberger , and Yan Thomas

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

Adam Langbert, Adam Matthiesen, Adit Sachde, Anmoti, Armand Philippot, chee, coderfee, Dixon Sean Low Yan Feng, Eduardo Bouças, Farhad, Junseong Park, Kenichi Nakamura, knj, liruifengv, Martin Trapp, Matthew Justice, Nin3, Paul Valladares, Philippe Serhal, Reuben Tier, Rezix, Robbie Wagner, ryu, Surya Kencana Putra, Thomas Bonnet, and Toby Nguyen