diff --git a/astro.sidebar.ts b/astro.sidebar.ts
index 5392673a160ac..2b2b98ce93c1d 100644
--- a/astro.sidebar.ts
+++ b/astro.sidebar.ts
@@ -147,9 +147,6 @@ export const sidebar = [
'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',
],
diff --git a/src/content/docs/en/getting-started.mdx b/src/content/docs/en/getting-started.mdx
index ec9c01835d6d2..9b70bb453fd03 100644
--- a/src/content/docs/en/getting-started.mdx
+++ b/src/content/docs/en/getting-started.mdx
@@ -5,6 +5,9 @@ i18nReady: true
tableOfContents: false
editUrl: false
next: false
+banner:
+ content: |
+ Astro v6 is here! Learn how to upgrade your site
hero:
title: Astro Docs
tagline: Guides, resources, and API references to help you build with Astro.
diff --git a/src/content/docs/en/guides/deploy/microsoft-azure.mdx b/src/content/docs/en/guides/deploy/microsoft-azure.mdx
index 57ffa6ddf0360..dfb03cdcd3785 100644
--- a/src/content/docs/en/guides/deploy/microsoft-azure.mdx
+++ b/src/content/docs/en/guides/deploy/microsoft-azure.mdx
@@ -38,7 +38,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"
},
```
diff --git a/src/content/docs/en/guides/deploy/netlify.mdx b/src/content/docs/en/guides/deploy/netlify.mdx
index 449e8fd034873..795ab2bdb7d5c 100644
--- a/src/content/docs/en/guides/deploy/netlify.mdx
+++ b/src/content/docs/en/guides/deploy/netlify.mdx
@@ -99,7 +99,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.
diff --git a/src/content/docs/en/guides/endpoints.mdx b/src/content/docs/en/guides/endpoints.mdx
index 3329a1bd64dad..51f9c9c65904b 100644
--- a/src/content/docs/en/guides/endpoints.mdx
+++ b/src/content/docs/en/guides/endpoints.mdx
@@ -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:
diff --git a/src/content/docs/en/guides/environment-variables.mdx b/src/content/docs/en/guides/environment-variables.mdx
index 1b8c4f73848c7..bcbe5b53c66d6 100644
--- a/src/content/docs/en/guides/environment-variables.mdx
+++ b/src/content/docs/en/guides/environment-variables.mdx
@@ -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.
diff --git a/src/content/docs/en/guides/images.mdx b/src/content/docs/en/guides/images.mdx
index 976b26a22f436..91fbbbec33997 100644
--- a/src/content/docs/en/guides/images.mdx
+++ b/src/content/docs/en/guides/images.mdx
@@ -51,7 +51,7 @@ All native HTML tags, including `` and `
-Provide a value for [`integrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference) if you already know the route to render. Doing so will bypass the internal call to [`app.match`](#appmatch) to determine the route to render.
+Provide a value for `integrationRouteData` if you already know the route to render. Doing so will bypass the internal call to [`app.match`](#appmatch) to determine the route to render.
```js "routeData"
const routeData = app.match(request);
diff --git a/src/content/docs/en/reference/api-reference.mdx b/src/content/docs/en/reference/api-reference.mdx
index 8bcdbedcee4bb..bd6c7f2b044e5 100644
--- a/src/content/docs/en/reference/api-reference.mdx
+++ b/src/content/docs/en/reference/api-reference.mdx
@@ -1048,118 +1048,3 @@ Loads a session by ID. In normal use, a session is loaded automatically from the
-
-
-### Deprecated object properties
-
-#### `Astro.glob()`
-
-:::caution[Deprecated in v5.0]
-Use [Vite's `import.meta.glob`](https://vite.dev/guide/features.html#glob-import) to query project files.
-
-`Astro.glob('../pages/post/*.md')` can be replaced with:
-
-`Object.values(import.meta.glob('../pages/post/*.md', { eager: true }));`
-
-See the [imports guide](/en/guides/imports/#importmetaglob) for more information and usage.
-:::
-
-`Astro.glob()` is a way to load many local files into your static site setup.
-
-```astro
----
-// src/components/my-component.astro
-const posts = await Astro.glob('../pages/post/*.md'); // returns an array of posts that live at ./src/pages/post/*.md
----
-
-
-```
-
-`.glob()` only takes one parameter: a relative URL glob of which local files you'd like to import. It’s asynchronous and returns an array of the exports from matching files.
-
-`.glob()` can't take variables or strings that interpolate them, as they aren't statically analyzable. (See [the imports guide](/en/guides/imports/#supported-values) for a workaround.) This is because `Astro.glob()` is a wrapper of Vite's [`import.meta.glob()`](https://vite.dev/guide/features.html#glob-import).
-
-:::note
-You can also use `import.meta.glob()` itself in your Astro project. You may want to do this when:
-- You need this feature in a file that isn't `.astro`, like an API route. `Astro.glob()` is only available in `.astro` files, while `import.meta.glob()` is available anywhere in the project.
-- You don't want to load each file immediately. `import.meta.glob()` can return functions that import the file content, rather than returning the content itself. Note that this import includes all styles and scripts for any imported files. These will be bundled and added to the page whether or not a file is actually used, as this is decided by static analysis, not at runtime.
-- You want access to each file's path. `import.meta.glob()` returns a map of a file's path to its content, while `Astro.glob()` returns a list of content.
-- You want to pass multiple patterns; for example, you want to add a "negative pattern" that filters out certain files. `import.meta.glob()` can optionally take an array of glob strings, rather than a single string.
-
-Read more in the [Vite documentation](https://vite.dev/guide/features.html#glob-import).
-:::
-
-##### Markdown Files
-
-Markdown files loaded with `Astro.glob()` return the following `MarkdownInstance` interface:
-
-```ts
-export interface MarkdownInstance> {
- /* Any data specified in this file's YAML/TOML frontmatter */
- frontmatter: T;
- /* The absolute file path of this file */
- file: string;
- /* The rendered path of this file */
- url: string | undefined;
- /* Astro Component that renders the contents of this file */
- Content: AstroComponentFactory;
- /** (Markdown only) Raw Markdown file content, excluding layout HTML and YAML/TOML frontmatter */
- rawContent(): string;
- /** (Markdown only) Markdown file compiled to HTML, excluding layout HTML */
- compiledContent(): string;
- /* Function that returns an array of the h1...h6 elements in this file */
- getHeadings(): Promise<{ depth: number; slug: string; text: string }[]>;
- default: AstroComponentFactory;
-}
-```
-
-You can optionally provide a type for the `frontmatter` variable using a TypeScript generic.
-
-```astro
----
-interface Frontmatter {
- title: string;
- description?: string;
-}
-const posts = await Astro.glob('../pages/post/*.md');
----
-
-
- {posts.map(post =>
{post.frontmatter.title}
)}
-
-```
-
-##### Astro Files
-
-Astro files have the following interface:
-
-```ts
-export interface AstroInstance {
- /* The file path of this file */
- file: string;
- /* The URL for this file (if it is in the pages directory) */
- url: string | undefined;
- default: AstroComponentFactory;
-}
-```
-
-##### Other Files
-
-Other files may have various different interfaces, but `Astro.glob()` accepts a TypeScript generic if you know exactly what an unrecognized file type contains.
-
-```ts
----
-interface CustomDataFile {
- default: Record;
-}
-const data = await Astro.glob('../data/**/*.js');
----
-```
diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx
index 4e30098a4ecb4..c6dbc501e3452 100644
--- a/src/content/docs/en/reference/configuration-reference.mdx
+++ b/src/content/docs/en/reference/configuration-reference.mdx
@@ -1587,14 +1587,14 @@ export default defineConfig({
Configures whether or not the home URL (`/`) generated by `src/pages/index.astro`
will redirect to `/[defaultLocale]` when `prefixDefaultLocale: true` is set.
-Set `redirectToDefaultLocale: false` to disable this automatic redirection at the root of your site:
+Set `redirectToDefaultLocale: true` to enable this automatic redirection at the root of your site:
```js
// astro.config.mjs
export default defineConfig({
@@ -1603,7 +1603,7 @@ export default defineConfig({
locales: ["en", "fr"],
routing: {
prefixDefaultLocale: true,
- redirectToDefaultLocale: false
+ redirectToDefaultLocale: true
}
}
})
diff --git a/src/content/docs/en/reference/errors/astro-glob-no-match.mdx b/src/content/docs/en/reference/errors/astro-glob-no-match.mdx
index 0e440b87c3717..e0f6b9d83d6b6 100644
--- a/src/content/docs/en/reference/errors/astro-glob-no-match.mdx
+++ b/src/content/docs/en/reference/errors/astro-glob-no-match.mdx
@@ -17,8 +17,3 @@ import DontEditWarning from '~/components/DontEditWarning.astro'
## What went wrong?
`Astro.glob()` did not return any matching files. There might be a typo in the glob pattern.
-
-**See Also:**
-- [Astro.glob](/en/reference/api-reference/#astroglob)
-
-
diff --git a/src/content/docs/en/reference/errors/astro-glob-used-outside.mdx b/src/content/docs/en/reference/errors/astro-glob-used-outside.mdx
index 0046b3892b504..f3473054c151f 100644
--- a/src/content/docs/en/reference/errors/astro-glob-used-outside.mdx
+++ b/src/content/docs/en/reference/errors/astro-glob-used-outside.mdx
@@ -17,8 +17,3 @@ import DontEditWarning from '~/components/DontEditWarning.astro'
## What went wrong?
`Astro.glob()` can only be used in `.astro` files. You can use [`import.meta.glob()`](https://vite.dev/guide/features.html#glob-import) instead to achieve the same result.
-
-**See Also:**
-- [Astro.glob](/en/reference/api-reference/#astroglob)
-
-
diff --git a/src/content/docs/en/reference/errors/content-collection-invalid-type.mdx b/src/content/docs/en/reference/errors/content-collection-invalid-type.mdx
new file mode 100644
index 0000000000000..79332174c63d2
--- /dev/null
+++ b/src/content/docs/en/reference/errors/content-collection-invalid-type.mdx
@@ -0,0 +1,23 @@
+---
+# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs'
+# Do not make edits to it directly, they will be overwritten.
+# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+# Translators, please remove this note and the component.
+
+title: Content collection invalid type.
+i18nReady: true
+githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+---
+
+import DontEditWarning from '~/components/DontEditWarning.astro'
+
+
+
+
+> Invalid collection type "data". Remove the type from your collection definition in your content config file.
+
+### What went wrong?
+
+Content collections should no longer have a type field. Remove this field from your content config file.
+
+See the [Astro 6 migration guide](/en/guides/upgrade-to/v6/#removed-legacy-content-collections) for more information.
\ No newline at end of file
diff --git a/src/content/docs/en/reference/errors/content-collection-missing-loader.mdx b/src/content/docs/en/reference/errors/content-collection-missing-loader.mdx
new file mode 100644
index 0000000000000..224406aa602c6
--- /dev/null
+++ b/src/content/docs/en/reference/errors/content-collection-missing-loader.mdx
@@ -0,0 +1,24 @@
+---
+# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs'
+# Do not make edits to it directly, they will be overwritten.
+# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+# Translators, please remove this note and the component.
+
+title: Content collection missing loader.
+i18nReady: true
+githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+---
+
+import DontEditWarning from '~/components/DontEditWarning.astro'
+
+
+
+
+> Collections must have a loader defined. Check your collection definitions in your content config file.
+
+### What went wrong?
+
+A content collection is missing a loader definition. Make sure that each collection in your content config file has a loader.
+
+**See Also:**
+- [Content collections configuration](/en/guides/content-collections/#defining-the-collection-loader)
diff --git a/src/content/docs/en/reference/errors/legacy-content-config-error.mdx b/src/content/docs/en/reference/errors/legacy-content-config-error.mdx
new file mode 100644
index 0000000000000..8dcd318ea0da5
--- /dev/null
+++ b/src/content/docs/en/reference/errors/legacy-content-config-error.mdx
@@ -0,0 +1,26 @@
+---
+# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs'
+# Do not make edits to it directly, they will be overwritten.
+# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+# Translators, please remove this note and the component.
+
+title: Legacy content config error.
+i18nReady: true
+githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
+---
+
+import DontEditWarning from '~/components/DontEditWarning.astro'
+
+
+
+
+> Legacy content config file found.
+
+### What went wrong?
+
+A legacy content config file was found. Move the file to `src/content.config.ts` and update any collection definitions if needed.
+
+See the [Astro 6 migration guide](/en/guides/upgrade-to/v6/#removed-legacy-content-collections) for more information.
+
+**See Also:**
+- [Content collections configuration](/en/guides/content-collections/#the-collection-config-file)
diff --git a/src/content/docs/en/reference/experimental-flags/heading-id-compat.mdx b/src/content/docs/en/reference/experimental-flags/heading-id-compat.mdx
deleted file mode 100644
index a19d1c9d01e49..0000000000000
--- a/src/content/docs/en/reference/experimental-flags/heading-id-compat.mdx
+++ /dev/null
@@ -1,75 +0,0 @@
----
-title: Experimental Markdown heading ID compatibility
-sidebar:
- label: Markdown heading ID compatibility
-i18nReady: true
----
-
-import Since from '~/components/Since.astro'
-
-
-
-**Type:** `boolean`
-**Default:** `false`
-
-
-
-The `experimental.headingIdCompat` flag makes the IDs generated by Astro for Markdown headings compatible with common platforms like GitHub and npm.
-
-To enable heading ID compatibility, set the flag to `true` in your Astro configuration:
-
-```js title="astro.config.mjs" ins={4-6}
-import { defineConfig } from "astro/config"
-
-export default defineConfig({
- experimental: {
- headingIdCompat: true,
- }
-})
-```
-
-## Usage
-
-This experimental flag allows you to retain the trailing hyphens on the end of IDs for Markdown headings ending in special characters, creating IDs compatible with those generated by other common platforms. It requires no specific usage and only affects how Astro generates the `id` for your headings written using Markdown syntax.
-
-Astro, like many platforms, uses the popular [`github-slugger`](https://github.com/Flet/github-slugger) package to convert the text content of a Markdown heading to a slug to use in IDs. This experimental flag allows you to omit Astro's additional default processing step that strips a trailing hyphen from the end of IDs for headings ending in special characters.
-
-For example, the following Markdown heading:
-
-```md
-## ``
-```
-
-will generate the following HTML in Astro by default:
-
-```html "picture"
-
<Picture />
-```
-
-Using `experimental.headingIdCompat`, the same Markdown will generate the following HTML, which is identical to that of platforms such as GitHub:
-
-```html "picture-"
-
<Picture />
-```
-
-In a future major version, Astro will switch to use the compatible ID style by default, but you can opt in to the future behavior early using the `experimental.headingIdCompat` flag.
-
-## Usage with `rehypeHeadingIds` plugin
-
-If you are [using the `rehypeHeadingIds` plugin](/en/guides/markdown-content/#heading-ids-and-plugins) directly, opt in to the compatibility mode when passing the plugin in your Astro configuration:
-
-
-```js title="astro.config.mjs" {8}
-import { defineConfig } from 'astro/config';
-import { rehypeHeadingIds } from '@astrojs/markdown-remark';
-import { otherPluginThatReliesOnHeadingIDs } from 'some/plugin/source';
-
-export default defineConfig({
- markdown: {
- rehypePlugins: [
- [rehypeHeadingIds, { headingIdCompat: true }],
- otherPluginThatReliesOnHeadingIDs,
- ],
- },
-});
-```
diff --git a/src/content/docs/en/reference/experimental-flags/preserve-scripts-order.mdx b/src/content/docs/en/reference/experimental-flags/preserve-scripts-order.mdx
deleted file mode 100644
index 429fb416c60d5..0000000000000
--- a/src/content/docs/en/reference/experimental-flags/preserve-scripts-order.mdx
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: Experimental preserve scripts order
-sidebar:
- label: Preserve scripts order
-i18nReady: true
----
-
-import Since from '~/components/Since.astro'
-
-
-
-Renders multiple `
-
-
-
-```
-
-After compiling, Astro's default behavior will create an inline style where `yellow` appears first, and then `red`. This means the `red` background is applied. Similarly with the two scripts, the word `world!` is logged first, and then `hello` second:
-
-```css
-body {background:#ff0} body {background:red}
-```
-
-```js
-console.log("world!")
-console.log("hello")
-```
-
-When `experimental.preserveScriptOrder` is set to `true`, the rendering order of `
-
-
-
-```
-
-Después de la compilación, el comportamiento predeterminado de Astro creará un estilo en línea donde `yellow` aparece primero, y luego `red`. Esto significa que se aplica el fondo `red`. De manera similar con los dos scripts, la palabra `world!` se registra primero, y luego `hello` en segundo lugar:
-
-```css
-body {background:#ff0} body {background:red}
-```
-
-```js
-console.log("world!")
-console.log("hello")
-```
-
-Cuando `experimental.preserveScriptOrder` se establece en `true`, el orden de renderizado de las etiquetas `
-
-
-
-```
-
-Après la compilation, le comportement par défaut d'Astro crée un style en ligne où `yellow` apparaît en premier, puis `red`. Cela signifie que l'arrière-plan `red` est appliqué. De même, avec les deux scripts, le mot `world!` est affiché en premier, suivi de `hello` :
-
-```css
-body {background:#ff0} body {background:red}
-```
-
-```js
-console.log("world!")
-console.log("hello")
-```
-
-Lorsque `experimental.preserveScriptOrder` est définie sur `true`, l'ordre de restitution des balises `
-
-
-
-```
-
-컴파일 후 Astro의 기본 동작은 `yellow`가 먼저 나타나고 `red`가 다음에 나타나는 인라인 스타일을 생성합니다. 이는 `red` 배경이 적용됨을 의미합니다. 두 스크립트의 경우 `world!`가 먼저 기록되고 `hello`가 다음에 기록됩니다.
-
-```css
-body {background:#ff0} body {background:red}
-```
-
-```js
-console.log("world!")
-console.log("hello")
-```
-
-`experimental.preserveScriptOrder`가 `true`로 설정되면 `
-
-
-
-```
-
-在编译后,Astro 的默认行为会创建一个内联样式,其中 `yellow` 首先出现,然后是 `red`。这意味着最终应用的是 `red` 背景。类似地,对于两个脚本,会先打印 `world!`,然后是 `hello`:
-
-```css
-body {background:#ff0} body {background:red}
-```
-
-```js
-console.log("world!")
-console.log("hello")
-```
-
-当 `experimental.preserveScriptOrder` 设置为 `true` 时,`