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/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`
+
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'`
+
@@ -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`
+
diff --git a/src/content/docs/en/reference/content-loader-reference.mdx b/src/content/docs/en/reference/content-loader-reference.mdx index ac5bbb40a78b4..062de7de6dec6 100644 --- a/src/content/docs/en/reference/content-loader-reference.mdx +++ b/src/content/docs/en/reference/content-loader-reference.mdx @@ -28,9 +28,9 @@ 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} +```ts title="src/content.config.ts" {2,6,11,17-21, 27-31} import { defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; @@ -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`
+
@@ -143,7 +172,7 @@ An optional object with the following properties:
-**Type:** `(text: string) => Record
+
+**Type:** `string | undefined`
+