Skip to content

Commit c74b95d

Browse files
authored
Merge branch 'main' into i18n/ja-custom-img-recipe
2 parents 56339d3 + 2316e02 commit c74b95d

File tree

18 files changed

+1153
-148
lines changed

18 files changed

+1153
-148
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121

2222
<!-- If you are a member of the Astro Discord, please add your username in the description so we can welcome you there! -->
2323
<!-- https://astro.build/chat -->
24+
25+
<!-- TAKING PART IN HACKTOBERFEST? LET US KNOW! -->
26+
<!-- See https://contribute.docs.astro.build/guides/hacktoberfest/ for more details. -->

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Submitting an Issue is usually the first step to making a change. After an Issue
4444

4545
Larger contributions to the docs are encouraged after participating in Issues and Discussions, as unsolicited material may not fit into our existing plans.
4646

47+
**Participating in Hacktoberfest?** See how you can get recognized for your translation PRs and PR reviews in our [Hacktoberfest guide](https://contribute.docs.astro.build/guides/hacktoberfest/).
48+
4749
### Examples of Helpful GitHub New Issues
4850

4951
- a particular explanation is confusing (with explanation)

scripts/docgen.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ export async function run() {
9595
// Make any links to docs relative instead of absolute.
9696
result = result.replace(/https:\/\/docs\.astro\.build\//g, '/');
9797

98+
// Make self-referencing anchor links relative
99+
result = result.replace(/\/en\/reference\/configuration-reference\/#/g, '#');
100+
98101
console.timeEnd(task);
99102
task = 'Update configuration-reference.mdx';
100103
console.time(task);

src/content/docs/de/guides/deploy/heroku.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
---
22
title: Veröffentliche deine Astro-Website auf Heroku
33
description: Wie du deine Astro-Website auf Heroku im Internet veröffentlichst.
4+
sidebar:
5+
label: Heroku
46
type: deploy
57
i18nReady: true
68
---
79

10+
import { Steps } from '@astrojs/starlight/components';
11+
812
[Heroku](https://www.heroku.com/) ist eine Platform-as-a-Service für die Erstellung, den Betrieb und die Verwaltung moderner Apps in der Cloud. Mit dieser Anleitung kannst du eine Astro-Website auf Heroku veröffentlichen.
913

14+
:::danger
15+
Die folgenden Anweisungen nutzen [das veraltete `heroku-static-buildpack`](https://github.com/heroku/heroku-buildpack-static#warning-heroku-buildpack-static-is-deprecated).
16+
Schau dir stattdessen die [Heroku-Dokumentation zur Verwendung von `heroku-buildpack-nginx`](https://github.com/dokku/heroku-buildpack-nginx) an.
17+
:::
18+
1019
## So funktioniert die Veröffentlichung
1120

21+
<Steps>
22+
1223
1. Installiere die Kommandozeilen&shy;schnittstelle [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
1324

1425
2. Erstelle ein Heroku-Konto, indem du dich [anmeldest](https://signup.heroku.com/).
@@ -21,9 +32,7 @@ i18nReady: true
2132

2233
4. Erstelle im Stammverzeichnis deines Projekts eine Datei namens `static.json` mit dem folgenden Inhalt:
2334

24-
`static.json`:
25-
26-
```json
35+
```json title="static.json"
2736
{
2837
"root": "./dist"
2938
}
@@ -55,3 +64,5 @@ i18nReady: true
5564
# Browser öffnen, um die Dashboard-Version von Heroku CI anzuzeigen
5665
$ heroku open
5766
```
67+
68+
</Steps>

src/content/docs/en/reference/cli-reference.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,14 @@ astro info
287287
Example output:
288288

289289
```
290-
Astro v3.0.12
291-
Node v20.5.1
290+
Astro v5.14.1
291+
Vite v6.3.6
292+
Node v22.17.1
292293
System macOS (arm64)
293-
Package Manager pnpm
294-
Output server
295-
Adapter @astrojs/vercel/serverless
296-
Integrations none
294+
Package Manager npm
295+
Output static
296+
Adapter none
297+
Integrations @astrojs/starlight (v0.35.3)
297298
```
298299

299300
## `astro preferences`

src/content/docs/en/reference/configuration-reference.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Set the route matching behavior for trailing slashes in the dev server and on-de
100100
When redirects occur in production for GET requests, the redirect will be a 301 (permanent) redirect. For all other request methods, it will be a 308 (permanent, and preserve the request method) redirect.
101101

102102
Trailing slashes on prerendered pages are handled by the hosting platform, and may not respect your chosen configuration.
103-
See your hosting platform's documentation for more information. You cannot use Astro [redirects](/en/reference/configuration-reference/#redirects) for this use case at this point.
103+
See your hosting platform's documentation for more information. You cannot use Astro [redirects](#redirects) for this use case at this point.
104104

105105
```js
106106
{
@@ -476,7 +476,7 @@ Setting `build.format` controls what `Astro.url` is set to during the build. Whe
476476

477477
This means that when you create relative URLs using `new URL('./relative', Astro.url)`, you will get consistent behavior between dev and build.
478478

479-
To prevent inconsistencies with trailing slash behaviour in dev, you can restrict the [`trailingSlash` option](/en/reference/configuration-reference/#trailingslash) to `'always'` or `'never'` depending on your build format:
479+
To prevent inconsistencies with trailing slash behaviour in dev, you can restrict the [`trailingSlash` option](#trailingslash) to `'always'` or `'never'` depending on your build format:
480480
- `directory` - Set `trailingSlash: 'always'`
481481
- `file` - Set `trailingSlash: 'never'`
482482

@@ -957,7 +957,7 @@ Add this attribute to any `<a />` link on your page to enable prefetching for th
957957
```html
958958
<a href="/about" data-astro-prefetch>About</a>
959959
```
960-
Further customize the default prefetching behavior using the [`prefetch.defaultStrategy`](/en/reference/configuration-reference/#prefetchdefaultstrategy) and [`prefetch.prefetchAll`](/en/reference/configuration-reference/#prefetchprefetchall) options.
960+
Further customize the default prefetching behavior using the [`prefetch.defaultStrategy`](#prefetchdefaultstrategy) and [`prefetch.prefetchAll`](#prefetchprefetchall) options.
961961

962962
See the [Prefetch guide](/en/guides/prefetch/) for more information.
963963

@@ -1083,7 +1083,7 @@ Set `false` to bypass the default image size limit for the Sharp image service a
10831083

10841084
Defines a list of permitted image source domains for remote image optimization. No other remote images will be optimized by Astro.
10851085

1086-
This option requires an array of individual domain names as strings. Wildcards are not permitted. Instead, use [`image.remotePatterns`](/en/reference/configuration-reference/#imageremotepatterns) to define a list of allowed source URL patterns.
1086+
This option requires an array of individual domain names as strings. Wildcards are not permitted. Instead, use [`image.remotePatterns`](#imageremotepatterns) to define a list of allowed source URL patterns.
10871087

10881088
```js
10891089
// astro.config.mjs
@@ -1580,7 +1580,7 @@ export default defineConfig({
15801580
<Since v="4.15.0" />
15811581
</p>
15821582

1583-
When [`i18n.fallback`](/en/reference/configuration-reference/#i18nfallback) is configured to avoid showing a 404 page for missing page routes, this option controls whether to [redirect](/en/guides/routing/#redirects) to the fallback page, or to [rewrite](/en/guides/routing/#rewrites) the fallback page's content in place.
1583+
When [`i18n.fallback`](#i18nfallback) is configured to avoid showing a 404 page for missing page routes, this option controls whether to [redirect](/en/guides/routing/#redirects) to the fallback page, or to [rewrite](/en/guides/routing/#rewrites) the fallback page's content in place.
15841584

15851585
By default, Astro's i18n routing creates pages that redirect your visitors to a new destination based on your fallback configuration. The browser will refresh and show the destination address in the URL bar.
15861586

src/content/docs/en/reference/container-reference.mdx

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Astro Container API (experimental)
33
sidebar:
44
label: Container API (experimental)
5-
i18nReady: false
5+
i18nReady: true
66
---
77
import Since from '~/components/Since.astro'
88

@@ -20,6 +20,11 @@ This API is experimental and subject to breaking changes, even in [minor or patc
2020

2121
## `create()`
2222

23+
<p>
24+
25+
**Type:** `(options?: AstroContainerOptions) => Promise<experimental_AstroContainer>`
26+
</p>
27+
2328
Creates a new instance of the container.
2429

2530
```js
@@ -50,13 +55,21 @@ export type AddServerRenderer =
5055

5156
### `streaming` option
5257

53-
**Type:** `boolean`
58+
<p>
59+
60+
**Type:** `boolean`<br />
61+
**Default:** `false`
62+
</p>
5463

5564
Enables rendering components using [HTML streaming](/en/guides/on-demand-rendering/#html-streaming).
5665

5766
### `renderers` option
5867

59-
**Type:** `AddServerRenderer[]`
68+
<p>
69+
70+
**Type:** `AddServerRenderer[]`<br />
71+
**Default:** `[]`
72+
</p>
6073

6174
A list of loaded client renderers required by the component. Use this if your `.astro` component renders any [UI framework components](/en/guides/framework-components/) or MDX using an official Astro integration (e.g. React, Vue, etc.).
6275

@@ -106,15 +119,20 @@ import vueRenderer from "@astrojs/vue/server.js";
106119
import mdxRenderer from "@astrojs/mdx/server.js";
107120

108121
const container = await experimental_AstroContainer.create();
109-
container.addServerRenderer({renderer: vueRenderer});
110-
container.addServerRenderer({renderer: mdxRenderer});
122+
container.addServerRenderer({ renderer: vueRenderer });
123+
container.addServerRenderer({ renderer: mdxRenderer });
111124

112125
container.addServerRenderer({ renderer: reactRenderer });
113126
container.addClientRenderer({ name: "@astrojs/react", entrypoint: "@astrojs/react/client.js" });
114127
```
115128

116129
## `renderToString()`
117130

131+
<p>
132+
133+
**Type:** <code>(component: AstroComponentFactory; options?: <a href="#rendering-options">ContainerRenderOptions</a>) => Promise&lt;string&gt;</code>
134+
</p>
135+
118136
This function renders a specified component inside a container. It takes an Astro component as an argument and it returns a string that represents the HTML/content rendered by the Astro component.
119137

120138
```js
@@ -125,12 +143,17 @@ const container = await experimental_AstroContainer.create();
125143
const result = await container.renderToString(Card);
126144
```
127145

128-
Under the hood, this function calls [`renderToResponse`](#rendertoresponse) and calls `Response.text()`.
146+
Under the hood, this function calls [`renderToResponse()`](#rendertoresponse) and `Response.text()`.
129147

130148
It also accepts an object as a second argument that can contain a [number of options](#rendering-options).
131149

132150
## `renderToResponse()`
133151

152+
<p>
153+
154+
**Type:** <code>(component: AstroComponentFactory; options?: <a href="#rendering-options">ContainerRenderOptions</a>) => Promise&lt;Response&gt;</code>
155+
</p>
156+
134157
It renders a component, and it returns a `Response` object.
135158

136159
```js
@@ -145,7 +168,7 @@ It also accepts an object as a second argument that can contain a [number of opt
145168

146169
## Rendering options
147170

148-
Both [`renderToResponse`](#rendertoresponse) and [`renderToString`](#rendertostring) accept an object as their second argument:
171+
Both [`renderToResponse()`](#rendertoresponse) and [`renderToString()`](#rendertostring) accept an object as their second argument:
149172

150173
```ts
151174
export type ContainerRenderOptions = {
@@ -154,15 +177,19 @@ export type ContainerRenderOptions = {
154177
request?: Request;
155178
params?: Record<string, string | undefined>;
156179
locals?: App.Locals;
157-
routeType?: "page" | "endpoint";
180+
routeType?: RouteType;
181+
partial?: boolean;
158182
};
159183
```
160184

161185
These optional values can be passed to the rendering function in order to provide additional information necessary for an Astro component to properly render.
162186

163187
### `slots`
164188

165-
**Type**: `Record<string, any>`;
189+
<p>
190+
191+
**Type**: `Record<string, any>`
192+
</p>
166193

167194
An option to pass content to be rendered with [`<slots>`](/en/basics/astro-components/#slots).
168195

@@ -224,7 +251,10 @@ const result = await container.renderToString(Card, {
224251

225252
### `props` option
226253

254+
<p>
255+
227256
**Type**: `Record<string, unknown>`
257+
</p>
228258

229259
An option to pass [properties](/en/basics/astro-components/#component-props) for Astro components.
230260

@@ -252,7 +282,10 @@ const { name } = Astro.props;
252282

253283
### `request` option
254284

285+
<p>
286+
255287
**Type**: `Request`
288+
</p>
256289

257290
An option to pass a `Request` with information about the path/URL the component will render.
258291

@@ -274,7 +307,10 @@ const result = await container.renderToString(Card, {
274307

275308
### `params` option
276309

277-
**Type**: `Record<string, string | undefined>`;
310+
<p>
311+
312+
**Type**: `Record<string, string | undefined>`
313+
</p>
278314

279315
An object to pass information about the path parameter to an Astro component responsible for [generating dynamic routes](/en/guides/routing/#dynamic-routes).
280316

@@ -300,7 +336,10 @@ const result = await container.renderToString(LocaleSlug, {
300336

301337
### `locals` options
302338

339+
<p>
340+
303341
**Type**: `App.Locals`
342+
</p>
304343

305344
An option to pass information from [`Astro.locals`](/en/reference/api-reference/#locals) for rendering your component.
306345

@@ -341,9 +380,12 @@ test("User is out", async () => {
341380

342381
### `routeType` option
343382

344-
**Type**: `"page" | "endpoint"`
383+
<p>
384+
385+
**Type**: `RouteType`
386+
</p>
345387

346-
An option available when using `renderToResponse` to specify that you are rendering an [endpoint](/en/guides/endpoints/):
388+
An option available when using `renderToResponse()` to specify that you are rendering an [endpoint](/en/guides/endpoints/):
347389

348390
```js
349391
container.renderToString(Endpoint, { routeType: "endpoint" });

src/content/docs/fr/reference/cli-reference.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,14 @@ astro info
287287
Exemple de sortie :
288288

289289
```
290-
Astro v3.0.12
291-
Node v20.5.1
290+
Astro v5.14.1
291+
Vite v6.3.6
292+
Node v22.17.1
292293
System macOS (arm64)
293-
Package Manager pnpm
294-
Output server
295-
Adapter @astrojs/vercel/serverless
296-
Integrations none
294+
Package Manager npm
295+
Output static
296+
Adapter none
297+
Integrations @astrojs/starlight (v0.35.3)
297298
```
298299

299300
## `astro preferences`

src/content/docs/fr/reference/configuration-reference.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Définissez le comportement de correspondance de route pour les barres obliques
9292
Lorsque des redirections se produisent en production pour les requêtes GET, la redirection sera une redirection 301 (permanente). Pour toutes les autres méthodes de requête, il s'agira d'une redirection 308 (permanente et conservant la méthode de requête).
9393

9494
Les barres obliques finales sur les pages pré-rendues sont gérées par la plate-forme d'hébergement et peuvent ne pas respecter la configuration que vous avez choisie.
95-
Consultez la documentation de votre plateforme d'hébergement pour plus d'informations. Vous ne pouvez pas utiliser [les redirections](/fr/reference/configuration-reference/#redirects) d'Astro pour ce cas d’utilisation à ce stade.
95+
Consultez la documentation de votre plateforme d'hébergement pour plus d'informations. Vous ne pouvez pas utiliser [les redirections](#redirects) d'Astro pour ce cas d’utilisation à ce stade.
9696

9797
```js
9898
{
@@ -461,7 +461,7 @@ La définition de `build.format` contrôle ce sur quoi `Astro.url` est défini p
461461

462462
Cela signifie que lorsque vous créez des URL relatives à l'aide de `new URL('./relative', Astro.url)`, vous obtiendrez un comportement cohérent entre le développement et la production.
463463

464-
Pour éviter les incohérences avec le comportement des barres obliques finales en développement, vous pouvez restreindre l'[option `trailingSlash`](/fr/reference/configuration-reference/#trailingslash) à `'always'` ou `'never'` selon votre format de compilation :
464+
Pour éviter les incohérences avec le comportement des barres obliques finales en développement, vous pouvez restreindre l'[option `trailingSlash`](#trailingslash) à `'always'` ou `'never'` selon votre format de compilation :
465465
- `directory` - Définissez `trailingSlash: 'always'`
466466
- `file` - Définissez `trailingSlash: 'never'`
467467

@@ -931,7 +931,7 @@ Ajoutez cet attribut à n'importe quel lien `<a />` sur votre page pour activer
931931
```html
932932
<a href="/a-propos" data-astro-prefetch>À propos</a>
933933
```
934-
Personnalisez davantage le comportement par défaut du préchargement à l'aide des options [`prefetch.defaultStrategy`](/fr/reference/configuration-reference/#prefetchdefaultstrategy) et [`prefetch.prefetchAll`](/fr/reference/configuration-reference/#prefetchprefetchall).
934+
Personnalisez davantage le comportement par défaut du préchargement à l'aide des options [`prefetch.defaultStrategy`](#prefetchdefaultstrategy) et [`prefetch.prefetchAll`](#prefetchprefetchall).
935935

936936
Consultez le [guide sur le préchargement](/fr/guides/prefetch/) pour plus d'informations.
937937

@@ -1056,7 +1056,7 @@ Définissez le paramètre sur `false` pour contourner la limite de taille des im
10561056

10571057
Définit une liste de domaines sources d'images autorisés pour l'optimisation des images à distance. Aucune autre image distante ne sera optimisée par Astro.
10581058

1059-
Cette option nécessite un tableau de noms de domaine individuels sous forme de chaînes de caractères. Les caractères génériques ne sont pas autorisés. Utilisez plutôt [`image.remotePatterns`](/fr/reference/configuration-reference/#imageremotepatterns) pour définir une liste de modèles d'URL source autorisés.
1059+
Cette option nécessite un tableau de noms de domaine individuels sous forme de chaînes de caractères. Les caractères génériques ne sont pas autorisés. Utilisez plutôt [`image.remotePatterns`](#imageremotepatterns) pour définir une liste de modèles d'URL source autorisés.
10601060

10611061
```js
10621062
// astro.config.mjs
@@ -1547,7 +1547,7 @@ export default defineConfig({
15471547
<Since v="4.15.0" />
15481548
</p>
15491549

1550-
Lorsque [`i18n.fallback`](/fr/reference/configuration-reference/#i18nfallback) est configuré pour éviter d'afficher une page 404 pour les routes de page manquantes, cette option contrôle s'il faut [rediriger](/fr/guides/routing/#redirections) vers la page de secours ou [réécrire](/fr/guides/routing/#réécritures) le contenu de la page de secours en place.
1550+
Lorsque [`i18n.fallback`](#i18nfallback) est configuré pour éviter d'afficher une page 404 pour les routes de page manquantes, cette option contrôle s'il faut [rediriger](/fr/guides/routing/#redirections) vers la page de secours ou [réécrire](/fr/guides/routing/#réécritures) le contenu de la page de secours en place.
15511551

15521552
Par défaut, le routage i18n d'Astro crée des pages qui redirigent vos visiteurs vers une nouvelle destination en fonction de votre configuration de repli. Le navigateur s'actualise et affiche l'adresse de destination dans la barre d'URL.
15531553

0 commit comments

Comments
 (0)