> 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/saitowosuru/site-structure.md).

# サイト構造

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

サイト上のコンテンツは、その [セクション](/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%2FVdIazRjl18hxN5SzpiqR%2FSite%20sections.svg?alt=media&amp;token=2e1d4bae-4a54-4daa-96f8-b248203c6d6b">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%2FGzx9x7fzQtLb7ewwm3T2%2FSite%20sections.png?alt=media&amp;token=fdc90c1d-6dee-48d9-93d6-a72bb8438cc2">25_12_10_site_sections_1.png</a></td><td><a href="/docs/documentation/ja-gitbook-documentation/saitowosuru/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%2FB96TQMaauF0yst75RsML%2FSite%20sections.png?alt=media&amp;token=64f5801b-c97b-4df0-8a6e-97da7d04880d">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%2FuWpHiQp4LvA5wpM5Ovo8%2FContent%20variants.svg?alt=media&amp;token=4b02400b-8994-4319-952d-db5e97661f02">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%2FDmZINE2qLnmlv30oMxUg%2FContent%20variants.png?alt=media&amp;token=69243fd5-6aa3-44c9-a5f1-e444ad2bac86">25_12_10_content_variants_1.png</a></td><td><a href="/docs/documentation/ja-gitbook-documentation/saitowosuru/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%2FUbgdVlll8ekhPqtj3V3z%2FContent%20variants.png?alt=media&amp;token=f696c0df-94de-45ba-8ee7-f72c0c8f8fdf">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%2FD4oCABc0YRJAFzaaVBpn%2Fstructure%402x.png?alt=media&amp;token=4c4dd0df-8e8e-40e7-8a57-e9791d337c8f" alt="A GitBook screenshot showing a docs site&#x27;s structure"><figcaption><p>公開済みドキュメントサイトの構造。</p></figcaption></figure>

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

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

追加するには [バリアント](/docs/documentation/ja-gitbook-documentation/saitowosuru/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%2FoXvDCD0U1CNnP8pJHL1L%2Fedit_variant%402x.png?alt=media&amp;token=fcea8367-71dd-441c-9f10-37171ab7f450" alt="A GitBook screenshot showing how to edit a variant"><figcaption><p>サイトのセクションまたはバリアントを更新します。</p></figcaption></figure></div>

各セクションとバリアントの名前とスラッグは、 **編集** <picture><source srcset="/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%2FA3OfGjPkE5GnOQvN36jN%2Fedit.svg?alt=media&amp;token=6f70239f-d889-4e64-9ec6-4801df47a48d" alt="The Edit icon in GitBook"></picture> ボタンを編集したい項目の表の行でクリックすると、モーダルが開きます。変更したいフィールドを編集し、次に **保存** ボタンをクリックして保存します。

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

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

セクションまたはバリアントを置き換えるには、まずその **編集** <picture><source srcset="/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%2FA3OfGjPkE5GnOQvN36jN%2Fedit.svg?alt=media&amp;token=6f70239f-d889-4e64-9ec6-4801df47a48d" alt="The Edit icon in GitBook"></picture> ボタンをクリックして削除し、次に **削除** ボタンをモーダルの左下でクリックします。項目が削除されたら、 **セクションを追加** または **バリアントを追加** ボタンをクリックして再度追加します。

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

サイトでは、セクションとバリアントが **サイト構造** 表に表示される順に並びます。 **ドラッグハンドル** <picture><source srcset="/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%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt="The Options menu icon in GitBook"></picture> をつかんで上下に移動します。変更後の順序はすぐにサイトに反映されます。

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

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

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

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

セクションまたはバリアントをデフォルトに設定するには、 **アクションメニュー** <picture><source srcset="/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%2F89MTSo5XRpPMVr1T0rxS%2Factions.svg?alt=media&amp;token=2b5d001e-560a-4f29-8d22-de8163725ca1" alt="The Actions menu icon in GitBook"></picture> をその表の行で開き、次に **デフォルトに設定**.

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

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

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

開く **アクションメニュー** <picture><source srcset="/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%2F89MTSo5XRpPMVr1T0rxS%2Factions.svg?alt=media&amp;token=2b5d001e-560a-4f29-8d22-de8163725ca1" alt="The Actions menu icon in GitBook"></picture> 削除したいコンテンツの **削除**.

{% hint style="success" %}
サイトからコンテンツを削除すると、公開サイトからは消えますが、 **コンテンツ自体は削除されません** — なお、 [すべてのコンテンツ](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
