From 6d055caa06bb61906ead43ee22baf026146bc7aa Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:10:45 -0400 Subject: [PATCH 1/6] document `retainBody` for glob() loader (#13150) Co-authored-by: Armand Philippot --- .../en/reference/content-loader-reference.mdx | 31 ++++++++++++++++++- .../en/reference/modules/astro-content.mdx | 4 ++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/reference/content-loader-reference.mdx b/src/content/docs/en/reference/content-loader-reference.mdx index ac5bbb40a78b4..21e25a853cf7f 100644 --- a/src/content/docs/en/reference/content-loader-reference.mdx +++ b/src/content/docs/en/reference/content-loader-reference.mdx @@ -28,7 +28,7 @@ Astro provides two built-in loaders to help you fetch your collections. Both off The `glob()` loader creates entries from directories of files from anywhere on the filesystem. The supported file types are Markdown, MDX, Markdoc, JSON, YAML, and TOML files. -This loader accepts an object with the following properties: `pattern`, `base` (optional), and `generateId` (optional). +This loader accepts an object with the following properties: `pattern`, `base` (optional), `generateId` (optional), and `retainBody` (optional). ```ts title="src/content.config.ts" {2,6,11,17-21} import { defineCollection } from 'astro:content'; @@ -44,6 +44,16 @@ const blog = defineCollection({ loader: glob({ pattern: "**/*.(md|mdx)", base: "./src/data/blog" }), schema: /* ... */ }); +const notes = defineCollection({ + /* Retrieve all Markdown files in your notes directory and prevent + * the raw body of content files from being stored in the data store. */ + loader: glob({ + pattern: '**/*.md', + base: './src/data/notes', + retainBody: false + }), + schema: /* ... */ +}); const authors = defineCollection({ /* Retrieve all JSON files in your authors directory while retaining * uppercase letters in the ID. */ @@ -91,6 +101,25 @@ A callback function that returns a unique string per entry in a collection. It a By default it uses [`github-slugger`](https://github.com/Flet/github-slugger) to generate a slug with [kebab-cased](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case) words. +#### `retainBody` + +

+ +**Type:** `boolean`
+**Default:** `true` + +

+ +Whether or not to store the raw body of content files in the data store. + +When `retainBody` is `false`, [`entry.body`](/en/reference/modules/astro-content/#body) will be `undefined` instead of containing the raw file contents. + +Setting this property to `false` significantly reduces the deployed size of the data store and helps avoid hitting size limits for sites with very large collections. + +For Markdown files, the rendered body will still be available in the [`entry.rendered.html` property](/en/reference/content-loader-reference/#rendered), and the [`entry.filePath` property](/en/reference/content-loader-reference/#filepath) will still point to the original file. + +For MDX collections, this will dramatically reduce the size of the collection, as there will no longer be any body retained in the store. + ### `file()` loader

diff --git a/src/content/docs/en/reference/modules/astro-content.mdx b/src/content/docs/en/reference/modules/astro-content.mdx index 42b6fa66f62d5..a8eb579f635fd 100644 --- a/src/content/docs/en/reference/modules/astro-content.mdx +++ b/src/content/docs/en/reference/modules/astro-content.mdx @@ -274,10 +274,12 @@ An object of frontmatter properties inferred from your collection schema ([see ` #### `body` -**Type:** `string` +**Type:** `string | undefined` A string containing the raw, uncompiled body of the Markdown or MDX document. +Note that if [`retainBody`](/en/reference/content-loader-reference/#retainbody) is set to `false`, this value will be `undefined` instead of containing the raw file contents. + ### `CollectionKey`

From 2b2d990f8f9fa464fd1b12155b787c16c0f6f148 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:19:54 -0400 Subject: [PATCH 2/6] add `background` property to `astro:assets` (#13149) Co-authored-by: ArmandPhilippot <59021693+ArmandPhilippot@users.noreply.github.com> Co-authored-by: jcayzac <106682+jcayzac@users.noreply.github.com> --- .../en/reference/modules/astro-assets.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/content/docs/en/reference/modules/astro-assets.mdx b/src/content/docs/en/reference/modules/astro-assets.mdx index c7176b70b1de5..c52dcc75491c2 100644 --- a/src/content/docs/en/reference/modules/astro-assets.mdx +++ b/src/content/docs/en/reference/modules/astro-assets.mdx @@ -324,6 +324,33 @@ fetchpriority="high" These individual attributes can still be set manually if you need to customize them further. +#### `background` + +

+ +**Type:** `string | undefined`
+ +

+ +The background color to use when flattening an image to transform it into the requested output `format`. + +By default, Sharp uses a black background when flattening an image. Specifying a different background color is especially useful when transforming images with transparent backgrounds to a format that does not support transparency (e.g. `jpeg`): + +```astro title="src/components/MyComponent.astro" "background" +--- +import { Image } from 'astro:assets'; +import myImage from '../assets/my_image.png'; +--- +A description of my image +``` + +Values are passed directly to the image service. Sharp accepts [any value the `color-string` package can parse](https://github.com/Qix-/color-string/blob/master/README.md#parsing). + ### ``

From c3c2cae7de559a8693c73f98a5598a953ec511fd Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:33:58 +0100 Subject: [PATCH 3/6] feat: add mention of possibility of perhaps async in the file() loader (#13108) Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Co-authored-by: ArmandPhilippot <59021693+ArmandPhilippot@users.noreply.github.com> --- src/content/docs/en/guides/content-collections.mdx | 2 +- src/content/docs/en/reference/content-loader-reference.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/guides/content-collections.mdx b/src/content/docs/en/guides/content-collections.mdx index d85093421e967..2d13a4875668e 100644 --- a/src/content/docs/en/guides/content-collections.mdx +++ b/src/content/docs/en/guides/content-collections.mdx @@ -90,7 +90,7 @@ Astro provides [two built-in loader functions](/en/reference/content-loader-refe The [`glob()` loader](/en/reference/content-loader-reference/#glob-loader) creates entries from directories of Markdown, MDX, Markdoc, JSON, YAML, or TOML files from anywhere on the filesystem. It accepts a `pattern` of entry files to match using glob patterns supported by [micromatch](https://github.com/micromatch/micromatch#matching-features), and a base file path of where your files are located. Each entry's `id` will be automatically generated from its file name. Use this loader when you have one file per entry. -The [`file()` loader](/en/reference/content-loader-reference/#file-loader) creates multiple entries from a single local file. Each entry in the file must have a unique `id` key property. It accepts a `base` file path to your file and optionally a [`parser` function](#parser-function) for data files it cannot parse automatically. Use this loader when your data file can be parsed as an array of objects. +The [`file()` loader](/en/reference/content-loader-reference/#file-loader) creates multiple entries from a single local file. Each entry in the file must have a unique `id` key property. It accepts a `base` file path to your file and optionally a [`parser` function](#parser-function) for data files it cannot parse automatically, or to parse data asynchronously. Use this loader when your data file can be parsed as an array of objects. ```ts title="src/content.config.ts" {6,10} import { defineCollection } from 'astro:content'; diff --git a/src/content/docs/en/reference/content-loader-reference.mdx b/src/content/docs/en/reference/content-loader-reference.mdx index 21e25a853cf7f..3a47d40dd167f 100644 --- a/src/content/docs/en/reference/content-loader-reference.mdx +++ b/src/content/docs/en/reference/content-loader-reference.mdx @@ -172,7 +172,7 @@ An optional object with the following properties:

-**Type:** `(text: string) => Record> | Array>` +**Type:** `(text: string) => Record> | Array> | Promise> | Array>>`

A callback function to create a collection from a file’s contents. Use it when you need to process file not supported by default (e.g. `.csv`) or when using [nested `.json` documents](/en/guides/content-collections/#nested-json-documents). From 840e2b385387581088f192552909af581d5a1dc4 Mon Sep 17 00:00:00 2001 From: John Mortlock Date: Wed, 28 Jan 2026 07:15:37 +1030 Subject: [PATCH 4/6] Add partitioned option to AstroCookieSetOptions reference (#13075) Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Co-authored-by: ArmandPhilippot <59021693+ArmandPhilippot@users.noreply.github.com> --- src/content/docs/en/reference/api-reference.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/content/docs/en/reference/api-reference.mdx b/src/content/docs/en/reference/api-reference.mdx index 8bcdbedcee4bb..56a79a84d67c1 100644 --- a/src/content/docs/en/reference/api-reference.mdx +++ b/src/content/docs/en/reference/api-reference.mdx @@ -829,6 +829,18 @@ Specifies a number, in seconds, for which the cookie is valid. Specifies a subpath of the domain in which the cookie is applied. +##### `partitioned` + +

+ +**Type:** `boolean`
+ +

+ +If true, the cookie is a [partitioned cookie](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies). Partitioned cookies can only be read within the context of the top-level site on which they were set, which allows cross-site tracking to be blocked while still enabling legitimate uses of third-party cookies. + +Partitioned cookies must be set with `secure: true`. + ##### `sameSite`

From c2eeb5ecdfbe5d730ef75f24fc01db800de2b285 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Thu, 29 Jan 2026 02:40:23 -0800 Subject: [PATCH 5/6] ci: update configuration reference docs (#13166) Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com> --- .../en/reference/configuration-reference.mdx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx index 4e30098a4ecb4..ef3a39fd99079 100644 --- a/src/content/docs/en/reference/configuration-reference.mdx +++ b/src/content/docs/en/reference/configuration-reference.mdx @@ -978,6 +978,19 @@ Whether to enable the Astro Dev Toolbar. This toolbar allows you to inspect your This option is scoped to the entire project, to only disable the toolbar for yourself, run `npm run astro preferences disable devToolbar`. To disable the toolbar for all your Astro projects, run `npm run astro preferences disable devToolbar --global`. +### devToolbar.placement + +

+ +**Type:** `'bottom-left' | 'bottom-center' | 'bottom-right'`
+**Default:** `'bottom-center'`
+ +

+ +The default placement of the Astro Dev Toolbar on the screen. + +The placement of the toolbar can still be changed via the toolbar settings UI. Once changed, the user's preference is saved in `localStorage` and overrides this configuration value. + ## Prefetch Options

@@ -1110,6 +1123,19 @@ Whether or not to limit the size of images that the Sharp image service will pro Set `false` to bypass the default image size limit for the Sharp image service and process large images. +#### image.service.config.kernel + +

+ +**Type:** `string | undefined`
+**Default:** `undefined`
+ +

+ +The default [kernel used for resizing images](https://sharp.pixelplumbing.com/api-resize/#resize) in the Sharp image service. + +By default this is `undefined`, which maps to Sharp's default kernel of `lanczos3`. + ### image.domains

From f76496b13a96b204833f56ea34d641f49da6b2a9 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Thu, 29 Jan 2026 06:59:06 -0400 Subject: [PATCH 6/6] final code formatting nits --- src/content/docs/en/reference/content-loader-reference.mdx | 2 +- src/content/docs/en/reference/modules/astro-assets.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/reference/content-loader-reference.mdx b/src/content/docs/en/reference/content-loader-reference.mdx index 3a47d40dd167f..062de7de6dec6 100644 --- a/src/content/docs/en/reference/content-loader-reference.mdx +++ b/src/content/docs/en/reference/content-loader-reference.mdx @@ -30,7 +30,7 @@ The `glob()` loader creates entries from directories of files from anywhere on t This loader accepts an object with the following properties: `pattern`, `base` (optional), `generateId` (optional), and `retainBody` (optional). -```ts title="src/content.config.ts" {2,6,11,17-21} +```ts title="src/content.config.ts" {2,6,11,17-21, 27-31} import { defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; diff --git a/src/content/docs/en/reference/modules/astro-assets.mdx b/src/content/docs/en/reference/modules/astro-assets.mdx index c52dcc75491c2..adc261b0e6aa3 100644 --- a/src/content/docs/en/reference/modules/astro-assets.mdx +++ b/src/content/docs/en/reference/modules/astro-assets.mdx @@ -334,7 +334,7 @@ These individual attributes can still be set manually if you need to customize t The background color to use when flattening an image to transform it into the requested output `format`. -By default, Sharp uses a black background when flattening an image. Specifying a different background color is especially useful when transforming images with transparent backgrounds to a format that does not support transparency (e.g. `jpeg`): +By default, Sharp uses a black background when flattening an image. Specifying a different background color is especially useful when transforming images with transparent backgrounds to a format that does not support transparency (e.g. `.jpeg`): ```astro title="src/components/MyComponent.astro" "background" ---