Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions astro.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export const sidebar = [
'reference/experimental-flags/content-intellisense',
'reference/experimental-flags/chrome-devtools-workspace',
'reference/experimental-flags/svg-optimization',
'reference/experimental-flags/collection-storage',
],
}),
'reference/legacy-flags',
Expand Down
36 changes: 36 additions & 0 deletions src/content/docs/en/reference/experimental-flags/data-store.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Experimental collection storage
sidebar:
label: Collection storage
i18nReady: true
---

import Since from '~/components/Since.astro'

<p>

**Type:** `"single-file" | "chunked"`<br />
**Default:** `"single-file"`<br />
<Since v="7.1.0" />
</p>

This experimental feature allows you to change how content collections' data is stored.

By default, Astro stores this data in a single file at `.astro/data-store.json`. When set to `"chunked"`, Astro splits the data across multiple files inside the `.astro/data-store/` folder.

```js title="astro.config.mjs" ins={5}
import { defineConfig } from "astro/config";

export default defineConfig({
experimental: {
collectionStorage: "chunked"
}
});
```

In chunked mode, files are split across multiple chunks. Astro creates a new chunk when:

- the current chunk reaches 1,000 entries;
- the current chunk is larger than 10 MB.

This option is recommended when deploying to platforms that have a size limit for individual assets.
Loading