withastro/astro
Patch Changes
-
#12097
11d447f
Thanks @ascorbic! - Fixes error where references in content layer schemas sometimes incorrectly report as missing -
#12108
918953b
Thanks @lameuler! - Fixes a bug where data URL images were not correctly handled. The bug resulted in anENAMETOOLONG
error. -
#12105
42037f3
Thanks @ascorbic! - Returns custom statusText that has been set in a Response -
[#12109](https://github.com/w...
Minor Changes
-
#12047
21b5e80
Thanks @rgodha24! - Adds a new optionalparser
property to the built-infile()
loader for content collections to support additional file types such astoml
andcsv
.The
file()
loader now accepts a second argument that defines aparser
function. This allows you to specify a custom parser (e.g.toml.parse
orcsv-parse
) to create a collection from a file's contents. Thefile()
loader will automatically detect and parse JSON and YAML files (based on their file extension) with no need for aparser
.This works with any type of custom file formats including
csv
andtoml
. The following example defines a content collectiondogs
using a.toml
file.[[dogs]] id = "..." age = "..." [[dogs]] id = "..." age = "..." ```...