You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ Submitting an Issue is usually the first step to making a change. After an Issue
44
44
45
45
Larger contributions to the docs are encouraged after participating in Issues and Discussions, as unsolicited material may not fit into our existing plans.
46
46
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
+
47
49
### Examples of Helpful GitHub New Issues
48
50
49
51
- a particular explanation is confusing (with explanation)
[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.
9
13
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
+
10
19
## So funktioniert die Veröffentlichung
11
20
21
+
<Steps>
22
+
12
23
1. Installiere die Kommandozeilen­schnittstelle [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
13
24
14
25
2. Erstelle ein Heroku-Konto, indem du dich [anmeldest](https://signup.heroku.com/).
@@ -21,9 +32,7 @@ i18nReady: true
21
32
22
33
4. Erstelle im Stammverzeichnis deines Projekts eine Datei namens `static.json` mit dem folgenden Inhalt:
23
34
24
-
`static.json`:
25
-
26
-
```json
35
+
```json title="static.json"
27
36
{
28
37
"root": "./dist"
29
38
}
@@ -55,3 +64,5 @@ i18nReady: true
55
64
# Browser öffnen, um die Dashboard-Version von Heroku CI anzuzeigen
Copy file name to clipboardExpand all lines: src/content/docs/en/reference/configuration-reference.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ Set the route matching behavior for trailing slashes in the dev server and on-de
100
100
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.
101
101
102
102
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.
104
104
105
105
```js
106
106
{
@@ -476,7 +476,7 @@ Setting `build.format` controls what `Astro.url` is set to during the build. Whe
476
476
477
477
This means that when you create relative URLs using `new URL('./relative', Astro.url)`, you will get consistent behavior between dev and build.
478
478
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:
480
480
-`directory` - Set `trailingSlash: 'always'`
481
481
-`file` - Set `trailingSlash: 'never'`
482
482
@@ -957,7 +957,7 @@ Add this attribute to any `<a />` link on your page to enable prefetching for th
957
957
```html
958
958
<ahref="/about"data-astro-prefetch>About</a>
959
959
```
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.
961
961
962
962
See the [Prefetch guide](/en/guides/prefetch/) for more information.
963
963
@@ -1083,7 +1083,7 @@ Set `false` to bypass the default image size limit for the Sharp image service a
1083
1083
1084
1084
Defines a list of permitted image source domains for remote image optimization. No other remote images will be optimized by Astro.
1085
1085
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.
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.
1584
1584
1585
1585
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.
@@ -50,13 +55,21 @@ export type AddServerRenderer =
50
55
51
56
### `streaming` option
52
57
53
-
**Type:**`boolean`
58
+
<p>
59
+
60
+
**Type:**`boolean`<br />
61
+
**Default:**`false`
62
+
</p>
54
63
55
64
Enables rendering components using [HTML streaming](/en/guides/on-demand-rendering/#html-streaming).
56
65
57
66
### `renderers` option
58
67
59
-
**Type:**`AddServerRenderer[]`
68
+
<p>
69
+
70
+
**Type:**`AddServerRenderer[]`<br />
71
+
**Default:**`[]`
72
+
</p>
60
73
61
74
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.).
62
75
@@ -106,15 +119,20 @@ import vueRenderer from "@astrojs/vue/server.js";
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.
It renders a component, and it returns a `Response` object.
135
158
136
159
```js
@@ -145,7 +168,7 @@ It also accepts an object as a second argument that can contain a [number of opt
145
168
146
169
## Rendering options
147
170
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:
149
172
150
173
```ts
151
174
exporttypeContainerRenderOptions= {
@@ -154,15 +177,19 @@ export type ContainerRenderOptions = {
154
177
request?:Request;
155
178
params?:Record<string, string|undefined>;
156
179
locals?:App.Locals;
157
-
routeType?:"page"|"endpoint";
180
+
routeType?:RouteType;
181
+
partial?:boolean;
158
182
};
159
183
```
160
184
161
185
These optional values can be passed to the rendering function in order to provide additional information necessary for an Astro component to properly render.
162
186
163
187
### `slots`
164
188
165
-
**Type**: `Record<string, any>`;
189
+
<p>
190
+
191
+
**Type**: `Record<string, any>`
192
+
</p>
166
193
167
194
An option to pass content to be rendered with [`<slots>`](/en/basics/astro-components/#slots).
168
195
@@ -224,7 +251,10 @@ const result = await container.renderToString(Card, {
224
251
225
252
### `props` option
226
253
254
+
<p>
255
+
227
256
**Type**: `Record<string, unknown>`
257
+
</p>
228
258
229
259
An option to pass [properties](/en/basics/astro-components/#component-props) for Astro components.
230
260
@@ -252,7 +282,10 @@ const { name } = Astro.props;
252
282
253
283
### `request` option
254
284
285
+
<p>
286
+
255
287
**Type**: `Request`
288
+
</p>
256
289
257
290
An option to pass a `Request` with information about the path/URL the component will render.
258
291
@@ -274,7 +307,10 @@ const result = await container.renderToString(Card, {
274
307
275
308
### `params` option
276
309
277
-
**Type**: `Record<string, string | undefined>`;
310
+
<p>
311
+
312
+
**Type**: `Record<string, string | undefined>`
313
+
</p>
278
314
279
315
An object to pass information about the path parameter to an Astro component responsible for [generating dynamic routes](/en/guides/routing/#dynamic-routes).
280
316
@@ -300,7 +336,10 @@ const result = await container.renderToString(LocaleSlug, {
300
336
301
337
### `locals` options
302
338
339
+
<p>
340
+
303
341
**Type**: `App.Locals`
342
+
</p>
304
343
305
344
An option to pass information from [`Astro.locals`](/en/reference/api-reference/#locals) for rendering your component.
Copy file name to clipboardExpand all lines: src/content/docs/fr/reference/configuration-reference.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Définissez le comportement de correspondance de route pour les barres obliques
92
92
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).
93
93
94
94
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.
96
96
97
97
```js
98
98
{
@@ -461,7 +461,7 @@ La définition de `build.format` contrôle ce sur quoi `Astro.url` est défini p
461
461
462
462
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.
463
463
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 :
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).
935
935
936
936
Consultez le [guide sur le préchargement](/fr/guides/prefetch/) pour plus d'informations.
937
937
@@ -1056,7 +1056,7 @@ Définissez le paramètre sur `false` pour contourner la limite de taille des im
1056
1056
1057
1057
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.
1058
1058
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.
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.
1551
1551
1552
1552
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.
0 commit comments