Skip to content
Merged
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion src/content/docs/ja/guides/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: インポート
description: Astroでさまざまな種類のコンテンツをインポートする方法を説明します。
i18nReady: true
---
import RecipeLinks from "~/components/RecipeLinks.astro";

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

Expand Down Expand Up @@ -211,6 +212,10 @@ globパターンは、特殊なワイルドカード文字をサポートする

[globパターンの構文について、詳しくはこちらをご覧ください](https://github.com/mrmlnc/fast-glob#pattern-syntax)。

#### `Astro.glob()`と`getCollection()`

[コンテンツコレクション](/ja/guides/content-collections/)は、`Astro.glob()`の代わりに複数のファイルを読み込むための[`getCollection()` API](/ja/reference/api-reference/#getcollection)を提供します。コンテンツファイル(Markdown、MDX、Markdocなど)が`src/content/`ディレクトリ内のコレクションに配置されている場合、`getCollection()`を使用して[コレクションのクエリ](/ja/guides/content-collections/#querying-collections)を行い、コンテンツのエントリーを返します。

## WASM

```js
Expand Down Expand Up @@ -248,4 +253,4 @@ const data = JSON.parse(json);
設定オプションや正しいインストール方法については、プラグインのドキュメントを参照してください。
:::

**関連レシピ:** [YAMLデータのインポートのサポートを追加](/ja/recipes/add-yaml-support/).
<RecipeLinks slugs={["ja/recipes/add-yaml-support"]} />