Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
099c3a0
create v6 upgrade guide page
sarah11918 Sep 15, 2025
64ea345
add sections
sarah11918 Sep 19, 2025
1a1f081
Remove ViewTransitions in v6 (#12347)
ellielok Sep 19, 2025
3e61972
updates home page banner to point to v6
sarah11918 Sep 22, 2025
b0aec7b
[v6] remove emitESMImage() (#12403)
florian-lefebvre Sep 23, 2025
49cfc17
[v6] redirectToDefaultLocale default behaviour change (#12353)
florian-lefebvre Sep 25, 2025
f7e6625
[v6]: remove Astro.glob() [i18nIgnore] (#12401)
florian-lefebvre Sep 25, 2025
35cc592
[v6] drop node 18 (#12423)
florian-lefebvre Sep 25, 2025
8292fb3
feat: update version
florian-lefebvre Sep 25, 2025
2b258ce
[v6] update vite to v7 (#12444)
florian-lefebvre Sep 29, 2025
369c7ab
[v6] deprecate Astro in getStaticPaths (#12435)
florian-lefebvre Sep 29, 2025
824ae0d
[v6] integration api cleanup (#12445)
florian-lefebvre Sep 29, 2025
43e9116
[v6] deprecate import.meta.env.ASSETS_PREFIX (#12468)
florian-lefebvre Oct 1, 2025
e840333
[v6] clean deprecated APIs (#12469)
florian-lefebvre Oct 1, 2025
7586143
[v6] trailing slash never for endpoints with file extension (#12467)
florian-lefebvre Oct 1, 2025
844769b
fix: diff
florian-lefebvre Oct 2, 2025
e397c23
fix: typo
florian-lefebvre Oct 2, 2025
31685a2
[v6] stabilize experimental.preserveScriptOrder option (#12480)
florian-lefebvre Oct 3, 2025
e3e6ab4
[v6] stabilize experimental.staticImportMetaEnv (#12494)
florian-lefebvre Oct 3, 2025
7306a26
[v6] remove context.rewrite in actions (#12477)
florian-lefebvre Oct 3, 2025
50394ca
i18n(ja): update `guides/imports.mdx` (#12449)
tkskto Oct 5, 2025
7962307
i18n(ja): update `tutorial/5-astro-api/1.mdx` (#12452)
tkskto Oct 5, 2025
b7d1636
[v6] stabilize experimental.headingIdCompat (#12510)
florian-lefebvre Oct 15, 2025
a409a05
simplify experimental flags section (#12587)
sarah11918 Oct 20, 2025
ab8cf68
support for legacy content collections removed (#12376)
sarah11918 Oct 20, 2025
40e4e34
Merge branch 'main' into v6
sarah11918 Oct 23, 2025
88ef3c5
[i18nIgnore] Localized v6 link failures related to Astro.glob() (#12616)
sarah11918 Oct 24, 2025
19a4fbe
Merge branch 'main' into v6
sarah11918 Oct 24, 2025
5d03bde
[v6] disallow number in getStaticPaths params (#12608)
ocavue Oct 27, 2025
7bee4c3
feat(reference): Update astro:assets reference for new Astro 6.0 beha…
Princesseuh Nov 7, 2025
251099c
Merge branch 'main' into v6
sarah11918 Nov 7, 2025
c60a6bf
some bold for emphasizing no more content collections backwards compa…
sarah11918 Nov 10, 2025
df25155
[next] remove app.setManifestData() (#12701)
florian-lefebvre Nov 12, 2025
25d8e57
Merge branch 'main' into v6
sarah11918 Nov 12, 2025
d1763cf
[next]: stabilize failOnPrerenderConflict (#12745)
florian-lefebvre Nov 21, 2025
8d5a0a9
Merge branch 'main' into v6
sarah11918 Nov 21, 2025
8f91a3a
updates link for deprecated `integrationRouteData`
sarah11918 Nov 24, 2025
9d74ea2
Merge branch 'main' into v6
sarah11918 Nov 24, 2025
e863a5e
Merge branch 'main' into v6
delucis Nov 27, 2025
8761f6d
[next]: add migration section for removal of internal exports (#12816)
trueberryless Dec 2, 2025
e3f2582
[v6] New content collections guide includes live collections (#12604)
sarah11918 Dec 3, 2025
d2e0318
Remove experimental live collections page (#12826)
sarah11918 Dec 3, 2025
fb02228
[next]: astro/zod (#12815)
florian-lefebvre Dec 3, 2025
4320520
fix code syntax
sarah11918 Dec 3, 2025
4859404
[next]: content loaders breaking changes (#12824)
florian-lefebvre Dec 4, 2025
9dce489
Merge branch 'main' into v6
sarah11918 Dec 4, 2025
d156b0d
Address v6 link errors (#12836)
sarah11918 Dec 4, 2025
b82df7e
Merge branch 'main' into v6
sarah11918 Dec 4, 2025
61a69c9
feat: show v6 migration guide in sidebar (#12833)
trueberryless Dec 4, 2025
09df252
docs: document Environment API breaking changes (#12809)
matthewp Dec 4, 2025
75aa7ec
Merge branch 'main' into v6
ArmandPhilippot Dec 9, 2025
2b40341
fix a remaining merge conflict...
ArmandPhilippot Dec 9, 2025
e4a63de
there was another merge conflict...
ArmandPhilippot Dec 9, 2025
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
7 changes: 1 addition & 6 deletions astro.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const sidebar = [
group('guides.upgrade.major', {
collapsed: true,
items: [
'guides/upgrade-to/v6',
'guides/upgrade-to/v5',
'guides/upgrade-to/v4',
'guides/upgrade-to/v3',
Expand Down Expand Up @@ -145,15 +146,9 @@ export const sidebar = [
'reference/experimental-flags',
'reference/experimental-flags/csp',
'reference/experimental-flags/fonts',
'reference/experimental-flags/live-content-collections',
'reference/experimental-flags/client-prerender',
'reference/experimental-flags/content-intellisense',
'reference/experimental-flags/preserve-scripts-order',
'reference/experimental-flags/heading-id-compat',
'reference/experimental-flags/static-import-meta-env',
'reference/experimental-flags/chrome-devtools-workspace',
'reference/experimental-flags/fail-on-prerender-conflict',
'reference/experimental-flags/svg-optimization',
],
}),
'reference/legacy-flags',
Expand Down
5 changes: 3 additions & 2 deletions src/content/docs/de/tutorial/6-islands/4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ Aktualisiere Astro und alle Integrationen auf die neuesten Versionen, indem du i

```ts title="src/content.config.ts"
import { glob } from "astro/loaders";
import { z, defineCollection } from "astro:content";
import { defineCollection } from "astro:content";
import { z } from "astro/zod";

const blog = defineCollection({
loader: glob({ pattern: '**/[^_]*.md', base: "./src/blog" }),
Expand Down Expand Up @@ -148,7 +149,7 @@ Aktualisiere Astro und alle Integrationen auf die neuesten Versionen, indem du i
1. Erstelle eine neue Seiten­datei `src/pages/posts/[...slug].astro`.
Markdown- und MDX-Dateien werden innerhalb einer Sammlung nicht mehr automatisch zu Seiten. Du musst daher eine Seite erstellen, die für die Ausgabe jedes einzelnen Blogbeitrags verantwortlich ist.

2. Füge den folgenden Code ein, um deine Sammlung [abzufragen](/de/guides/content-collections/#querying-collections) und für jede generierte Seite die `slug` und den Seiteninhalt bereitzustellen:
2. Füge den folgenden Code ein, um deine Sammlung [abzufragen](/de/guides/content-collections/#querying-build-time-collections) und für jede generierte Seite die `slug` und den Seiteninhalt bereitzustellen:

```astro title="src/pages/posts/[...slug].astro"
---
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/en/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ i18nReady: true
tableOfContents: false
editUrl: false
next: false
banner:
content: |
Astro v6 is here! <a href="/en/guides/upgrade-to/v6/">Learn how to upgrade your site</a>
hero:
title: Astro Docs
tagline: Guides, resources, and API references to help you build with Astro.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/cms/keystatic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Visit `http://127.0.0.1:4321/keystatic` in the browser to see the Keystatic Admi

## Rendering Keystatic content

Use Astro's Content Collections API to [query and display your posts and collections](/en/guides/content-collections/#querying-collections), just as you would in any Astro project.
[Query and display your posts and collections](/en/guides/content-collections/#querying-build-time-collections), just as you would in any Astro project.

### Displaying a collection list

Expand Down
672 changes: 482 additions & 190 deletions src/content/docs/en/guides/content-collections.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/content/docs/en/guides/deploy/microsoft-azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The GitHub action yaml that is created for you assumes the use of node 14. This

```
"engines": {
"node": ">=18.0.0"
"node": ">=22.12.0"
},
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/deploy/netlify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ You can also create a new site on Netlify and link up your Git repository by ins

### Set a Node.js version

If you are using a legacy [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) (Xenial) on Netlify, make sure that your Node.js version is set. Astro requires `v18.20.8` or `v20.3.0` or higher.
If you are using a legacy [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) (Xenial) on Netlify, make sure that your Node.js version is set. Astro requires `v22.12.0` or higher.

You can [specify your Node.js version in Netlify](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript) using:
- a [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file in your base directory.
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/en/guides/endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import type { APIRoute } from "astro";
export const GET: APIRoute = async ({ params, request }) => {...}
```

Note that endpoints whose URLs include a file extension (e.g. `src/pages/sitemap.xml.ts`) can only be accessed without a trailing slash (e.g. `/sitemap.xml`), regardless of your [`build.trailingSlash`](/en/reference/configuration-reference/#trailingslash) configuration.

### `params` and Dynamic routing

Endpoints support the same [dynamic routing](/en/guides/routing/#dynamic-routes) features that pages do. Name your file with a bracketed parameter name and export a [`getStaticPaths()` function](/en/reference/routing-reference/#getstaticpaths). Then, you can access the parameter using the `params` property passed to the endpoint function:
Expand Down
1 change: 0 additions & 1 deletion src/content/docs/en/guides/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Astro includes a few environment variables out of the box:
- `import.meta.env.DEV`: `true` if your site is running in development; `false` otherwise. Always the opposite of `import.meta.env.PROD`.
- `import.meta.env.BASE_URL`: The base URL your site is being served from. This is determined by the [`base` config option](/en/reference/configuration-reference/#base).
- `import.meta.env.SITE`: This is set to [the `site` option](/en/reference/configuration-reference/#site) specified in your project's `astro.config`.
- `import.meta.env.ASSETS_PREFIX`: The prefix for Astro-generated asset links if the [`build.assetsPrefix` config option](/en/reference/configuration-reference/#buildassetsprefix) is set. This can be used to create asset links not handled by Astro.

Use them like any other environment variable.

Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/en/guides/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ All native HTML tags, including `<img>` and `<svg>`, are also available in `.ast
For all images in `.astro` files, **the value of the image `src` attribute is determined by the location of your image file**:

- A local image from your project `src/` folder uses an import from the file's relative path.

The image and picture components use the named import directly (e.g. `src={rocket}`), while the `<img>` tag uses the `src` object property of the import (e.g. `src={rocket.src}`).

- Remote and `public/` images use a URL path.
Expand Down Expand Up @@ -321,7 +321,7 @@ import myImage from '../assets/my_image.png'; // Image is 1600x900

Responsive images are images that adjust to improve performance across different devices. These images can resize to fit their container, and can be served in different sizes depending on your visitor's screen size and resolution.

With [responsive image properties](/en/reference/modules/astro-assets/#responsive-image-properties) applied to the `<Image />` or `<Picture />` components, Astro will automatically generate the required `srcset` and `sizes` values for your images, and apply the necessary [styles to ensure they resize correctly](#responsive-image-styles).
With the [layout property](/en/reference/modules/astro-assets/#layout) applied to the `<Image />` or `<Picture />` components, Astro will automatically generate the required `srcset` and `sizes` values for your images, and apply the necessary [styles to ensure they resize correctly](#responsive-image-styles).

When this responsive behavior is [configured globally with `image.layout`](/en/reference/configuration-reference/#imagelayout), it will apply to all image components and also to any local and remote images using [the Markdown `![]()` syntax](/en/guides/images/#images-in-markdown-files).

Expand Down Expand Up @@ -396,7 +396,7 @@ The global styles applied by Astro will depend on the layout type, and are desig

The styles use the [`:where()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:where), which has a [specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascade/Specificity) of 0, meaning that it is easy to override with your own styles. Any CSS selector will have a higher specificity than `:where()`, so you can easily override the styles by adding your own styles to target the image.

You can override the `object-fit` and `object-position` styles on a per-image basis by setting the `fit` and `position` props on the `<Image />` or `<Picture />` component.
You can override the `object-fit` and `object-position` styles on a per-image basis by setting the `fit` and `position` props on the `<Image />` or `<Picture />` component.

#### Responsive images with Tailwind 4

Expand Down Expand Up @@ -590,8 +590,8 @@ This is a blog post
The `image` helper for the content collections schema lets you validate and import the image.

```ts title="src/content.config.ts"
import { defineCollection } from "astro:content";
import { z } from "astro/zod";
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';

const blogCollection = defineCollection({
schema: ({ image }) => z.object({
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Additionally, glob patterns must begin with one of the following:

### `import.meta.glob()` vs `getCollection()`

[Content collections](/en/guides/content-collections/) provide a [`getCollection()` API](/en/reference/modules/astro-content/#getcollection) for loading multiple files instead of `import.meta.glob()`. If your content files (e.g. Markdown, MDX, Markdoc) are located in collections within the `src/content/` directory, use `getCollection()` to [query a collection](/en/guides/content-collections/#querying-collections) and return content entries.
[Content collections](/en/guides/content-collections/) provide [performant, content-focused APIs](/en/reference/modules/astro-content/) for loading multiple files instead of `import.meta.glob()`. Use `getCollection()` and `getLiveCollection()` to query your collections and return content entries.

## WASM

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/integrations-guide/markdoc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Markdoc files can only be used within content collections. Add entries to any co
- quick-start.mdoc
</FileTree>

Then, query your collection using the [Content Collection APIs](/en/guides/content-collections/#querying-collections):
Then, [query and display your posts and collections](/en/guides/content-collections/#querying-build-time-collections):

```astro title="src/pages/why-markdoc.astro"
---
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/guides/integrations-guide/mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ It also adds extra features to standard MDX, including support for Markdown-styl

`.mdx` files must be written in [MDX syntax](https://mdxjs.com/docs/what-is-mdx/#mdx-syntax) rather than Astro’s HTML-like syntax.

### Using MDX with content collections
### Using local MDX with content collections

To include MDX files in a content collection, make sure that your [collection loader](/en/guides/content-collections/#defining-the-collection-loader) is configured to load content from `.mdx` files:
To include your local MDX files in a content collection, make sure that your [collection loader](/en/guides/content-collections/#build-time-collection-loaders) is configured to load content from `.mdx` files:

```js title="src/content.config.ts" ins="mdx"
import { defineCollection } from 'astro:content';
Expand Down
10 changes: 3 additions & 7 deletions src/content/docs/en/guides/internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,11 @@ Set this option when all routes will have their `/locale/` prefix in their URL a

- URLs without a locale prefix, (e.g. `example.com/about/`) will return a 404 (not found) status code unless you specify a [fallback strategy](#fallback).

### `redirectToDefaultLocale`
#### Opting out of redirects for the home URL

<p><Since v="4.2.0" /></p>
Even with your default locale routes prefixed, this behaviour does not apply by default to your site's index page. This allows you to have a home page that exists outside of your configured locale structure, where all of your localized routes are prefixed except the home URL of your site.

Configures whether or not the home URL (`/`) generated by `src/pages/index.astro` will redirect to `/<defaultLocale>`.

Setting `prefixDefaultLocale: true` will also automatically set `redirectToDefaultLocale: true` in your `routing` config object. By default, the required `src/pages/index.astro` file will automatically redirect to the index page of your default locale.

You can opt out of this behavior by [setting `redirectToDefaultLocale: false`](/en/reference/configuration-reference/#i18nroutingredirecttodefaultlocale). This allows you to have a site home page that exists outside of your configured locale folder structure.
You can opt out of this behavior so that your main site URL will also redirect to a prefixed, localized route for your default locale. When `prefixDefaultLocale: true` is set, you can additionally configure `redirectToDefaultLocale: true`. This will ensure that the home URL (`/`) generated by `src/pages/index.astro` will redirect to `/[defaultLocale]/`.

### `manual`

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/markdown-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ When using the frontmatter `layout` property, you must include the `<meta charse

Astro's internal Markdown processor is not available for processing remote Markdown.

To fetch remote Markdown for use in [content collections](/en/guides/content-collections/), you can [build a custom loader](/en/guides/content-collections/#building-a-custom-loader) with access to a [`renderMarkdown()` function](/en/reference/content-loader-reference/#rendermarkdown).
To fetch remote Markdown for use in [content collections](/en/guides/content-collections/), you can [build a custom loader](/en/guides/content-collections/#custom-build-time-loaders) with access to a [`renderMarkdown()` function](/en/reference/content-loader-reference/#rendermarkdown).

To fetch remote Markdown directly and render it to HTML, you will need to install and configure your own Markdown parser from NPM. This will not inherit from any of Astro's built-in Markdown settings that you have configured.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/media/cloudinary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const collections = {
}
```

You can then use the [`getCollection()` or `getEntry()` query functions](/en/guides/content-collections/#querying-collections) to select one or many images or videos from your collection.
You can then use the [`getCollection()` or `getEntry()` query functions](/en/guides/content-collections/#querying-build-time-collections) to select one or many images or videos from your collection.

See [Cloudinary's `cldAssetsLoader` documentation](https://astro.cloudinary.dev/cldassetsloader/basic-usage) for more information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ const randomUser = data.results[0];
---
```

See more about local files imports with [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [querying using the Collections API](/en/guides/content-collections/#querying-collections) or [fetching remote data](/en/guides/data-fetching/).
See more about local files imports with [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [querying with content collections](/en/guides/content-collections/#querying-build-time-collections) or [fetching remote data](/en/guides/data-fetching/).

### CRA Styling to Astro

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ When you rebuild your Gatsby site in Astro, you will notice some important diffe

- [Astro components](/en/basics/astro-components/) are not written as exported functions that return page templating. Instead, you'll split your code into a "code fence" for your JavaScript and a body exclusively for the HTML you generate.

- [Local file data](/en/guides/imports/): Gatsby uses GraphQL to retrieve data from your project files. Astro uses ESM imports and top-level await functions (e.g. [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [`getCollection()`](/en/guides/content-collections/#querying-collections)) to import data from your project files. You can manually add GraphQL to your Astro project but it is not included by default.
- [Local file data](/en/guides/imports/): Gatsby uses GraphQL to retrieve data from your project files. Astro uses ESM imports and top-level await functions (e.g. [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [`getCollection()`](/en/guides/content-collections/#querying-build-time-collections)) to import data from your project files. You can manually add GraphQL to your Astro project but it is not included by default.

## Convert your Gatsby Project

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ const randomUser = data.results[0];
---
```

See more about local files imports with [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [querying using the Collections API](/en/guides/content-collections/#querying-collections) or [fetching remote data](/en/guides/data-fetching/).
See more about local files imports with [`import.meta.glob()`](/en/guides/imports/#importmetaglob), [querying with content collections](/en/guides/content-collections/#querying-build-time-collections) or [fetching remote data](/en/guides/data-fetching/).

### Next Styling to Astro

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/guides/upgrade-to/v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ function useRoute(route: IntegrationRouteData) {
}
```

<ReadMore>See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference).</ReadMore>
<ReadMore>See the API reference for `IntegrationRouteData`.</ReadMore>

### Changed: `distURL` is now an array (Integrations API)

Expand All @@ -1139,7 +1139,7 @@ if (route.distURL) {
}
```

<ReadMore>See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference).</ReadMore>
<ReadMore>See the API reference for `IntegrationRouteData`.</ReadMore>

### Changed: Arguments passed to `app.render()` (Adapter API)

Expand Down
Loading
Loading