Skip to content

Commit 6b7dd2f

Browse files
authored
Merge branch 'main' into fr_markdown_content_mdx
2 parents c3f9890 + 5ce13aa commit 6b7dd2f

65 files changed

Lines changed: 1739 additions & 441 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ This repo contains all the source code we use to build our docs site.
1010
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/github/withastro/docs)
1111
[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https://pr.new/github.com/withastro/docs)
1212

13-
🎃 **Participating in Hacktoberfest?** [See our Hacktoberfest guide](https://github.com/withastro/docs/blob/main/.github/hacktoberfest.md)! 🎃
14-
1513
## We are Astro
1614

1715
Astro is an all-in-one web framework for building fast, content-focused websites.

contributor-guides/translating-astro-docs.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Thanks for your interest in helping us translate [docs.astro.build](https://docs.astro.build/)! This can be a great way to get involved with open-source development without having to code.
44

5-
**Participating in Hacktoberfest?** See how you can get recognized for your translation PRs and PR reviews in our [Hacktoberfest guide](../.github/hacktoberfest.md).
6-
75
Currently, we are aiming to translate the Astro documentation into the following languages:
86

97
- Brazilian Portuguese

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

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Wie du deine Astro-Website im Internet veröffentlichst.
44
i18nReady: true
55
---
66
import DeployGuidesNav from '~/components/DeployGuidesNav.astro';
7+
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
78

89
**Bist du bereit, deine Astro-Website zu erzeugen und zu veröffentlichen?**
910
Folge einer unserer Anleitungen zu den verschiedenen Hosting-Anbietern, oder scrolle weiter nach unten, um allgemeine Informationen zur Veröffentlichung einer Astro-Website zu erhalten.
@@ -41,13 +42,27 @@ Manche Hosting-Anbieter stellen eine eigene Kommandozeilen­schnittstelle (CL
4142

4243
1. Installiere die CLI deines Hosting-Anbieters global, zum Beispiel:
4344

44-
```bash
45-
npm install --global netlify-cli
46-
```
47-
48-
1. Starte die CLI und folge den Anweisungen zur Authentifizierung, Einrichtung usw.
49-
50-
1. Erzeuge deine Website und veröffentliche sie bei deinem Hosting-Anbieter.
45+
<PackageManagerTabs>
46+
<Fragment slot="npm">
47+
```shell
48+
npm install --global netlify-cli
49+
```
50+
</Fragment>
51+
<Fragment slot="pnpm">
52+
```shell
53+
pnpm add --global netlify-cli
54+
```
55+
</Fragment>
56+
<Fragment slot="yarn">
57+
```shell
58+
yarn global add netlify-cli
59+
```
60+
</Fragment>
61+
</PackageManagerTabs>
62+
63+
2. Starte die CLI und folge den Anweisungen zur Authentifizierung, Einrichtung usw.
64+
65+
3. Erzeuge deine Website und veröffentliche sie bei deinem Hosting-Anbieter.
5166

5267
Viele gängige Anbieter bauen und veröffentlichen deine Website für dich. Im Normalfall werden sie dein Projekt als Astro-Website erkennen und sollten die folgenden Konfigurationseinstellungen zum Erzeugen und Veröffentlichen festlegen (falls nicht, können diese angepasst werden):
5368

@@ -60,15 +75,29 @@ Manche Hosting-Anbieter stellen eine eigene Kommandozeilen&shy;schnittstelle (CL
6075

6176
## Erzeuge deine Website lokal
6277

63-
Viele Anbieter wie Netlify und Vercel erzeugen deine Website für dich und veröffentlichen das Ergebnis dann im Internet. Manche Anbieter setzen aber voraus, dass du deine Website lokal selbst erzeugst und dann entweder einen Veröffentlichungs-Befehl ausführst oder die Build-Ausgabe hochlädst.
78+
Viele Anbieter wie Netlify und Vercel erzeugen deine Website für dich und veröffentlichen das Ergebnis dann im Internet. Manche Anbieter setzen aber voraus, dass du deine Website lokal selbst erzeugst und dann entweder einen Veröffentlichungs-Befehl ausführst oder die Build-Ausgabe hochlädst.
6479

6580
Vielleicht möchtest du deine Website auch lokal erzeugen, um sie dir als Vorschau anzusehen oder mögliche Fehler und Warnungen in deiner eigenen Umgebung zu entdecken.
6681

6782
Nutze den Befehl `npm run build`, um deine Astro-Website zu erzeugen:
6883

69-
```bash
70-
npm run build
71-
```
84+
<PackageManagerTabs>
85+
<Fragment slot="npm">
86+
```shell
87+
npm run build
88+
```
89+
</Fragment>
90+
<Fragment slot="pnpm">
91+
```shell
92+
pnpm run build
93+
```
94+
</Fragment>
95+
<Fragment slot="yarn">
96+
```shell
97+
yarn run build
98+
```
99+
</Fragment>
100+
</PackageManagerTabs>
72101

73102
Die Build-Ausgabe wird standardmäßig ins Verzeichnis `dist/` geschrieben. Dieses Ziel kann über die [`outDir`-Konfigurationsoption](/de/reference/configuration-reference/#outdir) geändert werden.
74103

src/content/docs/de/recipes/add-yaml-support.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,31 @@ i18nReady: false
55
type: recipe
66
---
77

8+
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
9+
810
Astro baut auf Vite auf und unterstützt sowohl Vite- als auch Rollup-Plugins. Dieses Rezept verwendet ein Rollup-Plugin, um eine YAML-Datei (`.yml`) in Astro importieren zu können.
911

1012
## Rezept
1113

1214
1. Installiere `@rollup/plugin-yaml`:
1315

14-
```bash
16+
<PackageManagerTabs>
17+
<Fragment slot="npm">
18+
```shell
1519
npm install @rollup/plugin-yaml --save-dev
1620
```
21+
</Fragment>
22+
<Fragment slot="pnpm">
23+
```shell
24+
pnpm add @rollup/plugin-yaml --save-dev
25+
```
26+
</Fragment>
27+
<Fragment slot="yarn">
28+
```shell
29+
yarn add @rollup/plugin-yaml --save-dev
30+
```
31+
</Fragment>
32+
</PackageManagerTabs>
1733

1834
2. Importiere das Plugin in deine `astro.config.mjs` und füge es dem Vite Plugins-Array hinzu:
1935

src/content/docs/en/core-concepts/astro-components.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ const { title } = Astro.props
290290

291291
Slots can be transfered to other components. For example, when creating nested layouts:
292292

293-
```astro {11,14}
294-
// src/layouts/BaseLayout.astro
293+
```astro title="src/layouts/BaseLayout.astro" {11,14}
295294
---
296295
---
297296

src/content/docs/en/core-concepts/astro-pages.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ Read more <a href="/authors/sonali/">about Sonali</a>.
3939

4040
Astro pages use the `.astro` file extension and support the same features as [Astro components](/en/core-concepts/astro-components/).
4141

42-
```astro
42+
```astro title="src/pages/index.astro"
4343
---
44-
// Example: src/pages/index.astro
4544
---
4645
<html lang="en">
4746
<head>
@@ -59,7 +58,7 @@ To avoid repeating the same HTML elements on every page, you can move common `<h
5958

6059
```astro {3} /</?MySiteLayout>/
6160
---
62-
// Example: src/pages/index.astro
61+
// src/pages/index.astro
6362
import MySiteLayout from '../layouts/MySiteLayout.astro';
6463
---
6564
<MySiteLayout>

src/content/docs/en/core-concepts/astro-syntax.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ const name = "Astro";
4949
HTML attributes will be converted to strings, so it is not possible to pass functions and objects to HTML elements.
5050
For example, you can't assign an event handler to an HTML element in an Astro component:
5151

52-
```astro
52+
```astro title="dont-do-this.astro"
5353
---
54-
// dont-do-this.astro
5554
function handleClick () {
5655
console.log("button clicked!");
5756
}
@@ -62,9 +61,8 @@ function handleClick () {
6261

6362
Instead, use a client-side script to add the event handler, like you would in vanilla JavaScript:
6463

65-
```astro
64+
```astro title="do-this-instead.astro"
6665
---
67-
// do-this-instead.astro
6866
---
6967
<button id="button">Click Me</button>
7068
<script>

src/content/docs/en/core-concepts/routing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ You can use the `paginate()` function to generate these pages for an array of va
327327

328328
```astro /{ (paginate) }/ /paginate\\(.*\\)/ /(?<=const.*)(page)/ /page\\.[a-zA-Z]+/
329329
---
330-
// Example: src/pages/astronauts/[page].astro
330+
// src/pages/astronauts/[page].astro
331331
export async function getStaticPaths({ paginate }) {
332332
const astronautPages = [{
333333
astronaut: 'Neil Armstrong',
@@ -367,7 +367,7 @@ When you use the `paginate()` function, each page will be passed its data via a
367367

368368
```astro /(?<=const.*)(page)/ /page\\.[a-zA-Z]+(?:\\.(?:prev|next))?/
369369
---
370-
// Example: src/pages/astronauts/[page].astro
370+
// src/pages/astronauts/[page].astro
371371
// Paginate same list of { astronaut } objects as the previous example
372372
export async function getStaticPaths({ paginate }) { /* ... */ }
373373
const { page } = Astro.props;
@@ -428,7 +428,7 @@ In the following example, we will implement nested pagination to build the URLs
428428

429429
```astro /(?:[(]|=== )(tag)/ "params: { tag }" /const [{ ]*(page|params)/
430430
---
431-
// Example: src/pages/[tag]/[page].astro
431+
// src/pages/[tag]/[page].astro
432432
export async function getStaticPaths({ paginate }) {
433433
const allTags = ['red', 'blue', 'green'];
434434
const allPosts = await Astro.glob('../../posts/*.md');

src/content/docs/en/core-concepts/sharing-state.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Your base Astro file may look like this:
124124

125125
```astro
126126
---
127-
// Example: src/pages/index.astro
127+
// src/pages/index.astro
128128
import CartFlyoutToggle from '../components/CartFlyoutToggle';
129129
import CartFlyout from '../components/CartFlyout';
130130
import AddToCartForm from '../components/AddToCartForm';

src/content/docs/en/guides/cms/tina-cms.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
1212

1313
## Integrating with Astro
1414

15-
To get started, you'll need an existing Astro project.
15+
To get started, you'll need an existing Astro project.
1616

1717
1. Run the following command to install Tina into your Astro project.
1818

@@ -38,8 +38,8 @@ To get started, you'll need an existing Astro project.
3838
- When prompted "What framework are you using", choose **Other**.
3939
- When asked where public assets are stored, press <kbd>Enter</kbd>.
4040

41-
After this has finished, you should now have a `.tina` folder in the root of your project and an `admin` folder in your public directory. It will also create a Markdown file at `content/posts/hello-world.md`.
42-
41+
After this has finished, you should now have a `.tina` folder in the root of your project and a generated `hello-world.md` file at `content/posts`.
42+
4343
2. Change the `dev` script in `package.json`:
4444

4545
<PackageManagerTabs>
@@ -132,7 +132,7 @@ To get started, you'll need an existing Astro project.
132132
name: "body",
133133
label: "Body",
134134
isBody: true,
135-
},
135+
},
136136
],
137137
},
138138
],
@@ -148,7 +148,7 @@ To get started, you'll need an existing Astro project.
148148

149149
- [TinaCMS Astro integration guide](https://tina.io/docs/frameworks/astro/).
150150

151-
## Community Resources
151+
## Community Resources
152152

153153
- [Astro Tina Starter with visual editing](https://github.com/dawaltconley/tina-astro) by Jeff See + Dylan Awalt-Conley
154154
- [Astro Tina Starter with basic editing](https://github.com/tombennet/astro-tina-starter/tree/main) by Tom Bennet

0 commit comments

Comments
 (0)