Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 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
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
2 changes: 0 additions & 2 deletions astro.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ 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',
],
}),
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ editUrl: false
next: false
banner:
content: |
Astro v5 is here! <a href="/en/guides/upgrade-to/v5/">Learn how to upgrade your site</a>
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/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ Actions are accessible as public endpoints based on the name of the action. For

To authorize action requests, add an authentication check to your action handler. You may want to use [an authentication library](/en/guides/authentication/) to handle session management and user information.

Actions expose the full `APIContext` object to access properties passed from middleware using `context.locals`. When a user is not authorized, you can raise an `ActionError` with the `UNAUTHORIZED` code:
Actions expose the `ActionAPIContext` object, a subset of `APIContext`, to access properties passed from middleware using `context.locals`. When a user is not authorized, you can raise an `ActionError` with the `UNAUTHORIZED` code:

```ts title="src/actions/index.ts" {6-8}
import { defineAction, ActionError } from 'astro:actions';
Expand Down
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 @@ -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"
},
```

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 @@ -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.
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: 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
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