> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure.md).

# サイト構造

セクション、バリアント、外部リンクを使って、公開ドキュメントを整理します

サイトのコンテンツは、 [セクション](https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/content-structure/space.md)に分かれています。セクションは1つでも複数でも追加できます。GitBookは各セクションを公開し、セクション間のナビゲーションも管理します。

## コンテンツの種類

サイト内のコンテンツは、2 つの異なるコンテンツタイプのいずれかとして機能でき、それによって GitBook がそのコンテンツをどのように扱い、訪問者に表示するかが決まります。

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-type="image">カバー画像（ダーク）</th><th data-hidden data-card-cover data-type="image">カバー画像</th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden><select></select></th><th data-hidden data-card-cover-dark data-type="image">カバー画像（ダーク）</th></tr></thead><tbody><tr><td><strong>セクション</strong></td><td>サイトを明確に区切られた部分に分けます。複数の製品や組織の複数部門に最適です。</td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-12ea6e551e1e565fa8de101106fd0171c5de2f5b%2F25_08_29_site_sections.svg?alt=media">25_08_29_site_sections.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-ec53f8f7499d7ad408a21dbad800676453bb3026%2F25_12_10_site_sections_1.png?alt=media">25_12_10_site_sections_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure/site-sections.md">セクション</a></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-da4dae17d68633634557ef1231d752e7ad5f93ff%2F25_12_10_site_sections.png?alt=media">25_12_10_site_sections.png</a></td></tr><tr><td><strong>コンテンツバリアント</strong></td><td>同じコンテンツの複数バージョンを公開します。ローカライズやバージョン管理などに最適です。</td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-deae71cbecc45bb8df4a45ac759fbce15ef71308%2F25_08_29_content_variants.svg?alt=media">25_08_29_content_variants.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-c5b1ce79a08b476db23db7c01de73249ce6d3dce%2F25_12_10_content_variants_1.png?alt=media">25_12_10_content_variants_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure/variants.md">コンテンツバリアント</a></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-f650b6888150ed69e6a055ea47f9732332e64092%2F25_12_10_content_variants.png?alt=media">25_12_10_content_variants.png</a></td></tr></tbody></table>

## サイト構造の管理

サイトの構造を管理すると、サイト上部のナビゲーションバーも管理できます。このナビゲーションバーでは、訪問者がセクション、グループ、外部リンクを開けます。

サイトのサイドバーで **サイト構造** を開きます。ここでは、サイトのセクション、バリアント、外部リンクを確認できます。

サイトは、サイト名が表示された1つのセクションと、サイトのセットアップ中に作成したコンテンツを含む1つのバリアントから始まります。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-b13c3123b0d22ce9fce674e4d650a32ac78b5078%2F25_12_10_structure_light.png?alt=media" alt="A GitBook screenshot showing a docs site&#x27;s structure"><figcaption><p>公開済みドキュメントサイトの構造。</p></figcaption></figure>

### ドキュメントサイトにセクションを追加する

新しい [セクション](https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure/site-sections.md)を追加するには、テーブルの下にある **セクションを追加** ボタンをクリックし、追加するコンテンツを選択します。新しいセクションがテーブルに追加され、サイト上部のタブとして訪問者に表示されます。

新しい [バリアント](https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure/variants.md)を追加するには、追加先のセクションにある **バリアントを追加** ボタンをクリックし、追加するコンテンツを選択します。新しいバリアントが選択したセクション内のバリアント一覧に追加され、サイトのバリアントドロップダウンから訪問者が選択できるようになります。

コンテンツをバリアントまたはセクションとして追加すると、タイトルに基づいて名前とスラッグが生成されます。

### 外部リンクを追加する

外部リンクを追加すると、サイト外の移動先をナビゲーションに加えられます。リンクを独立したナビゲーション項目として追加するか、関連するセクションとともにセクショングループに配置できます。

外部リンクを追加するには:

1. サイトのサイドバーで **サイト構造**.
2. 追加メニューから **外部リンク**.
3. リンクのラベルとリンク先 URL を入力します。
4. リンクを個別に追加するか、セクショングループに追加するかを選択します。
5. を選択します。 **保存**.

リンクは、選択した位置に公開済みサイトのナビゲーションに表示されます。

### セクションまたはバリアントの変更

<div data-full-width="false"><figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-006e95ace860b31f7ec4f29b24eca552ea2c0dcf%2F25_12_10_edit_variant_light.png?alt=media" alt="A GitBook screenshot showing how to edit a variant"><figcaption><p>サイトのセクションまたはバリアントを更新します。</p></figcaption></figure></div>

各セクションやバリアントの名前とスラッグを変更するには、編集したい項目の行にある **編集** <picture><source srcset="broken://files/kN09oTFtAuyaxNIwWuCt" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-d28f11ed4dfafb06aa9c6ae92db8017d94014317%2F25_01_10_edit_icon_light.svg?alt=media" alt="The Edit icon in GitBook"></picture> ボタンをクリックします。モーダルが開くので、変更するフィールドを編集し、 **保存** ボタンをクリックして保存します。

{% hint style="info" %}
セクションのスラッグを変更すると、正規URLも変わります。GitBookは古いURLから新しいURLへのリダイレクトを自動で作成します。また、 [リダイレクトを手動で作成](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/site-redirects.md).
{% endhint %}

{% hint style="info" %}
スラッグは組織全体で一意です。各パスは 1 つのサイトでしか使用できず、別のサイトをまたいでも重複できません。"path is already taken" エラーが表示される場合、別のサイトですでにそのスラッグが使われています。コンテンツに意味がありつつ、少しだけ変えたスラッグを選んでください。
{% endhint %}

セクションまたはバリアントを置き換えるには、まずその項目の **編集** <picture><source srcset="broken://files/kN09oTFtAuyaxNIwWuCt" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-d28f11ed4dfafb06aa9c6ae92db8017d94014317%2F25_01_10_edit_icon_light.svg?alt=media" alt="The Edit icon in GitBook"></picture> ボタンをクリックし、モーダルの左下にある **削除** ボタンをクリックして削除します。項目を削除したら、 **セクションを追加** または **バリアントを追加** ボタンをクリックして、もう一度追加します。

### セクションまたはバリアントの並べ替え

サイトでは、セクションとバリアントが **サイト構造** テーブルに表示されている順序で表示されます。 **ドラッグハンドル** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt="The Options menu icon in GitBook"></picture> をつかんで上下に移動すると、順序を変更できます。変更した順序はすぐにサイトに反映されます。

キーボードを使ってコンテンツを選択し、移動することもできます。スペースバーでセクションまたはバリアントを選択し、矢印キーで上下に移動します。もう一度スペースバーを押して、新しい位置を確定します。

### デフォルトコンテンツの設定

サイトに複数のセクションがある場合、そのうち1つが **デフォルト**に設定されます。このセクションは訪問者がサイトにアクセスしたときに表示され、サイトのルートURLから配信されます。その他のセクションには、それぞれルートURLに追加されるスラッグがあります。

セクション内に複数のバリアントがある場合、1 つのバリアントがデフォルトとしてマークされます。セクションと同様に、デフォルトのバリアントは訪問者がサイトにアクセスしたとき、またはセクションを訪れたときに表示されます。その他のバリアントには、それぞれセクションの URL に追加されるスラッグがあります。

セクションまたはバリアントをデフォルトに設定するには、その行にある **アクションメニュー** <picture><source srcset="broken://files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-aabbca522107ef561981bdfe5af94605b31e0920%2F25_01_10_actions_icon_light.svg?alt=media" alt="The Actions menu icon in GitBook"></picture> をクリックし、 **デフォルトに設定**.

{% hint style="info" %}
コンテンツをデフォルトに設定すると、セクションのルートから配信されるため、スラッグ欄は削除されます。GitBook は古いスラッグを適切なパスにリダイレクトし、訪問者が引き続きコンテンツを見られるようにします。
{% endhint %}

### サイトからコンテンツを削除する

サイトからセクションまたはバリアントを削除するには、次から構造エディターを開きます **サイト構造** サイトのサイドバーで、削除したいコンテンツを見つけます。

削除したいコンテンツの **アクションメニュー** <picture><source srcset="broken://files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-aabbca522107ef561981bdfe5af94605b31e0920%2F25_01_10_actions_icon_light.svg?alt=media" alt="The Actions menu icon in GitBook"></picture> を開き、 **削除**.

{% hint style="success" %}
サイトからコンテンツを削除すると、公開中のサイトからは削除されますが、 **コンテンツそのものは削除されません** 。引き続き [すべてのコンテンツ](https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/content-structure/all-content.md).
{% endhint %}

で確認できます。セクションのコンテンツをすべて削除しても、サイトは設定やカスタマイズとともに引き続き利用できます。削除したコンテンツは、完全に削除されるまで7日間 **ゴミ箱** に保管されます。削除したセクションがサイトのデフォルトだった場合は、デフォルトが正しく設定されていることを確認してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
