Skip to content

Commit

Permalink
fix front matter typo's (withastro#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElianCodes authored Apr 13, 2023
1 parent 125c7c8 commit 1a6c732
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/en/guides/upgrade-to/v1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ import './style.css';
Importing CSS files should work anywhere that ESM imports are supported, including:
- JavaScript files
- TypeScript files
- Astro component front matter
- Astro component frontmatter
- non-Astro components like React, Svelte, and others

When a CSS file is imported using this method, any `@import` statements are also resolved and inlined into the imported CSS file. All `url()` references are also resolved relative to the source file, and any `url()` referenced assets will be included in the final build.
Expand Down Expand Up @@ -661,7 +661,7 @@ Ensure you have PostCSS installed. This was optional in previous releases, but i

#### Imports on top

In Astro v0.21+, a bug has been introduced that requires imports inside components to be at the top of your front matter.
In Astro v0.21+, a bug has been introduced that requires imports inside components to be at the top of your frontmatter.

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ For this guide, copy-and-paste the following code snippet (including `---` dashe
```astro title="src/pages/index.astro"
---
// Welcome to Astro! Everything between these triple-dash code fences
// is your "component front matter". It never runs in the browser.
// is your "component frontmatter". It never runs in the browser.
console.log('This runs in your terminal, not the browser!');
---
<!-- Below is your "component template." It's just HTML, but with
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/directives-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ The `is:inline` directive is implied whenever any attribute other than `src` is

### `define:vars`

`define:vars={...}` can pass server-side variables from your component frontmatter into the client `<script>` or `<style>` tags. Any JSON-serializable front matter variable is supported, including `props` passed to your component through `Astro.props`. Values are serialized with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
`define:vars={...}` can pass server-side variables from your component frontmatter into the client `<script>` or `<style>` tags. Any JSON-serializable frontmatter variable is supported, including `props` passed to your component through `Astro.props`. Values are serialized with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/fr/guides/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Fichiers Statiques
description: Apprenez à importer différents types de contenu avec Astro.
---

Astro supporte la plupart des ressources statiques sans aucune configuration requise. Vous pouvez utiliser la directive `import` n'importe où dans votre projet JavaScript (y compris votre *front matter* d'Astro) et Astro inclura une copie construite et optimisée de cette ressource statique dans votre build final. `@import` est également prise en charge dans les balises CSS et `<style>`.
Astro supporte la plupart des ressources statiques sans aucune configuration requise. Vous pouvez utiliser la directive `import` n'importe où dans votre projet JavaScript (y compris votre *frontmatter* d'Astro) et Astro inclura une copie construite et optimisée de cette ressource statique dans votre build final. `@import` est également prise en charge dans les balises CSS et `<style>`.

## Types de fichiers supportés

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/fr/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Les styles délimités devraient être utilisés aussi souvent que possible. Les

<Since v="0.21.0" />

La balise `<style>` d'Astro peut référencer n'importe quelle variable CSS disponible sur la page. Vous pouvez aussi passer des variables CSS directement depuis le *front-matter* de votre composant en utilisant la directive `define:vars`.
La balise `<style>` d'Astro peut référencer n'importe quelle variable CSS disponible sur la page. Vous pouvez aussi passer des variables CSS directement depuis le *frontmatter* de votre composant en utilisant la directive `define:vars`.

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Astroでさまざまな種類のコンテンツをインポート
i18nReady: true
---

Astroは、ほとんどの静的アセットを設定不要でサポートしています。プロジェクトのJavaScript(Astro front-matterスクリプトを含む)のどこでも`import`文を使用でき、Astroは最終ビルドにその静的アセットのビルドされた最適化されたコピーを含めます。また、`@import`はCSSと`<style>`タグの中でもサポートされています。
Astroは、ほとんどの静的アセットを設定不要でサポートしています。プロジェクトのJavaScript(Astro frontmatterスクリプトを含む)のどこでも`import`文を使用でき、Astroは最終ビルドにその静的アセットのビルドされた最適化されたコピーを含めます。また、`@import`はCSSと`<style>`タグの中でもサポートされています。


## 対応するファイル形式
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ja/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const { isRed } = Astro.props;

<Since v="0.21.0" />

Astroの`<style>`は、ページ上で利用可能なあらゆるCSS変数を参照できます。また、`define:vars`ディレクティブを使用して、コンポーネントのfront-matterから直接CSS変数を渡せます
Astroの`<style>`は、ページ上で利用可能なあらゆるCSS変数を参照できます。また、`define:vars`ディレクティブを使用して、コンポーネントのfrontmatterから直接CSS変数を渡せます

```astro title="src/components/DefineVars.astro" /define:vars={{.*}}/ /var\\(.*\\)/
---
Expand Down Expand Up @@ -186,7 +186,7 @@ HTML要素は、`style`属性を使ってインラインでスタイルを設定
npmパッケージからインポートする場合、`astro.config`を更新する必要があるかもしれません。以下の[スタイルシートをnpmパッケージからインポートする](#npmパッケージからスタイルシートをインポートする)をご覧ください。
:::

ESMのインポート構文を使用して、Astroコンポーネントのfront-matterでスタイルシートをインポートできます。CSSのインポートは、[Astroコンポーネント内の他のESMのインポート](/ja/core-concepts/astro-components/#コンポーネントスクリプト)のように動作し、**コンポーネントからの相対パス**を、ほかのimportと同様にコンポーネントスクリプトの**先頭**に記述しなければなりません。
ESMのインポート構文を使用して、Astroコンポーネントのfrontmatterでスタイルシートをインポートできます。CSSのインポートは、[Astroコンポーネント内の他のESMのインポート](/ja/core-concepts/astro-components/#コンポーネントスクリプト)のように動作し、**コンポーネントからの相対パス**を、ほかのimportと同様にコンポーネントスクリプトの**先頭**に記述しなければなりません。

```astro title="src/pages/index.astro" {4}
---
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ja/guides/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ nodeLinker: "node-modules"

`console.log()`は、Astroのコードをデバッグするためのシンプルでありながら人気のある方法です。`console.log`ステートメントをどこに書くかによって、デバッグ出力がどこに出力されるかが決まります。

#### Front-matter
#### Frontmatter

AstroのFront-matterの`console.log()`は、常にAstro CLIを実行している**ターミナル**に出力されます。これは、Astroがサーバー上で動作していて、ブラウザ上では動作しないためです。
AstroのFrontmatterの`console.log()`は、常にAstro CLIを実行している**ターミナル**に出力されます。これは、Astroがサーバー上で動作していて、ブラウザ上では動作しないためです。

```astro {5}
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ npm install astro
```astro
---
// Astroへようこそ!この3つのダッシュで囲まれた部分のコードが、
// 「コンポーネントのFront Matter」です。ブラウザで実行されることはありません。
// 「コンポーネントのfrontmatter」です。ブラウザで実行されることはありません。
console.log('これはブラウザではなく、ターミナルで実行されます!');
---
<!-- 以下は「コンポーネントテンプレート」です。これは単なるHTMLですが
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/reference/configuration-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Astro がサイトを読み込むディレクトリを設定します。

マークダウンのドラフトページがビルドに含まれるかを制御します。

マークダウンページが front-matter`draft: true` を含む場合、ドラフトとみなされます。ドラフトページは開発環境 (`astro dev`) では常に含まれ、閲覧できますが、デフォルトでは最終的なビルドに含まれません。
マークダウンページが frontmatter`draft: true` を含む場合、ドラフトとみなされます。ドラフトページは開発環境 (`astro dev`) では常に含まれ、閲覧できますが、デフォルトでは最終的なビルドに含まれません。

```js
{
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/pl/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Na potrzeby tego przewodnika, skopiuj i wklej następujący fragment kodu (włą

```astro title="src/pages/index.astro"
---
// Witamy w Astro! Wszystko pomiędzy tymi potrójnymi kreskami to "front matter" twojego komponentu.
// Witamy w Astro! Wszystko pomiędzy tymi potrójnymi kreskami to "frontmatter" twojego komponentu.
// Jego zawartość nigdy nie zostanie wykonana w przeglądarce.
console.log('To wykona się w terminalu, nie w przeglądarce!')
---
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/pt-br/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const { isVermelho } = Astro.props;

<Since v="0.21.0" />

Em Astro, `<style>` pode referenciar quaisquer variáveis disponíveis na página. Ademais, você pode também passar variáveis CSS diretamente do front matter do seu componente usando a diretiva `define:vars`.
Em Astro, `<style>` pode referenciar quaisquer variáveis disponíveis na página. Ademais, você pode também passar variáveis CSS diretamente do frontmatter do seu componente usando a diretiva `define:vars`.

```astro title="src/components/DefineVars.astro" /define:vars={{.*}}/ /var\\(.*\\)/
---
Expand Down Expand Up @@ -158,7 +158,7 @@ Há duas formas para incluir folhas de estilos globais e externas: uma importaç
Você talvez precise atualizar o seu astro.config quando estiver importando CSS de pacotes do npm. Veja a [seção de importação de uma folha de estilos de um pacote do npm](#importe-uma-folha-de-estilos-de-um-pacote-do-npm) abaixo.
:::

Você pode importar folhas de estilos no front matter do seu componente Astro usando a sintaxe de importação ESM. Importação de CSS funcionam como [qualquer outra importação ESM em um componente Astro](/pt-br/core-concepts/astro-components/#o-script-do-componente), que deve ser referenciada **relativo para o componente** e obrigatoriamente deve ser escrito no **início** do script do seu componente junto com outras importações.
Você pode importar folhas de estilos no frontmatter do seu componente Astro usando a sintaxe de importação ESM. Importação de CSS funcionam como [qualquer outra importação ESM em um componente Astro](/pt-br/core-concepts/astro-components/#o-script-do-componente), que deve ser referenciada **relativo para o componente** e obrigatoriamente deve ser escrito no **início** do script do seu componente junto com outras importações.

```astro title="src/pages/index.astro" {4}
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/pt-br/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Para este guia, copie e cole o seguinte trecho de código (incluindo os traços
```astro
---
// Bem vindo ao Astro! Tudo entre estes traços triplos é o
// "front matter" do componente. Este código nunca executa no navegador.
// "frontmatter" do componente. Este código nunca executa no navegador.
console.log('Este código executa em seu terminal, não em seu navegador!');
---
<!-- Abaixo está o "template" do seu componente. É apenas HTML, mas
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ru/core-concepts/layouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import MySiteLayout from '../layouts/MySiteLayout.astro';
## Markdown макеты

Макеты обычно полезны для [Markdown файлов](/ru/guides/markdown-content/#markdown-и-mdx-страницы).
Файлы Markdown могут использовать специальное свойство `layout` front matter, для указания какой `.astro` компонент использовать как макет страницы.
Файлы Markdown могут использовать специальное свойство `layout` frontmatter, для указания какой `.astro` компонент использовать как макет страницы.

**`src/pages/posts/post-1.md`**

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ cd my-astro-project
```astro
---
// 欢迎来到 Astro!这些三横线所围住的代码
// 就是你的“组件 front matter”。它不会运行在浏览器中。
// 就是你的“组件 frontmatter”。它不会运行在浏览器中。
console.log('它运行在终端而非浏览器!');
---
<!-- 下面是你的“组件模板”。 这仅仅是 HTML,但是
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/reference/directives-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ import api from '../db/api.js';

### `define:vars`

`define:vars={...}` 可以将服务器端的变量从组件 frontmatter 传递给客户端的 `<script>``<style>` 标签。支持任何 **JSON 可序列化的** front matter 变量,包括通过 `Astro.props` 传递给组件的 `props`。值可以使用 [`JSON.stringify()`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) 进行序列化。
`define:vars={...}` 可以将服务器端的变量从组件 frontmatter 传递给客户端的 `<script>``<style>` 标签。支持任何 **JSON 可序列化的** frontmatter 变量,包括通过 `Astro.props` 传递给组件的 `props`。值可以使用 [`JSON.stringify()`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) 进行序列化。

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/zh-tw/install/manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cd my-astro-project
```astro title="src/pages/index.astro"
---
// Welcome to Astro! Everything between these triple-dash code fences
// is your "component front matter". It never runs in the browser.
// is your "component frontmatter". It never runs in the browser.
console.log('This runs in your terminal, not the browser!');
---
<!-- Below is your "component template." It's just HTML, but with
Expand Down

0 comments on commit 1a6c732

Please sign in to comment.