> 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/zh/docs-site/site-structure/site-sections.md).

# 站点章节

<figure><img src="/files/0ee8611bce34a9d957cfc9f31cad87d654e061df" alt="A GitBook screenshot showing site sections on a docs site"><figcaption><p>带有站点部分的 GitBook 网站示例</p></figcaption></figure>

通过站点部分，你可以将所有文档集中管理，并为用户打造无缝体验。

站点部分非常适合整理你的文档——无论你是在管理彼此独立的产品，还是通过为终端用户和开发者分别定制内容来满足两者需求。

你还可以 [将站点部分分组](#create-a-site-section-group)。这样会在导航栏中创建一个下拉菜单——非常适合为站点部分添加层级结构。

{% hint style="info" %}
**部分还是变体？**

每个站点部分在 GitBook 中对应一个空间。你可以从任何你喜欢的空间创建站点部分，但我们建议你将部分用于文档中语义上不同的内容。

如果你想添加相同内容的不同版本——例如本地化版本或同一产品的历史版本——请考虑使用 [内容变体](/docs/documentation/zh/docs-site/site-structure/variants.md) 。
{% endhint %}

### 向你的文档站点添加部分

在你的文档站点仪表板中，打开 **设置** 标签页，然后点击 **结构**。在这里你可以查看站点的所有内容。

要添加一个站点部分，请点击 **新部分** 表格下方的按钮，并选择一个要链接为部分的空间。然后，新部分会添加到表格中，并作为站点顶部的标签页供访客查看。

<figure><img src="/files/d71127096fe17e984522527ec20ea9a3bed3c8d6" alt="A GitBook screenshot showing site section structure"><figcaption><p>使用站点部分为你的文档添加结构。</p></figcaption></figure>

### 创建站点部分组

你可以将站点部分归入一个标题下。站点部分组会在你站点的导航中显示为下拉菜单。组内的站点部分还可以包含可选描述，该描述会显示在下拉菜单中的部分标题下方。

要创建一个组，请点击 **新部分** 按钮旁边的箭头，然后选择 **新部分组**。为新组命名，然后点击 **添加部分** 在弹窗中将部分添加到你的组。你可以将站点中已有的部分添加到新组，或使用菜单选择你想添加的另一个空间。

如果你的站点支持多语言，你还可以翻译部分组标题，以及部分标题和描述。请参阅 [多语言部分](/docs/documentation/zh/docs-site/site-structure/multilingual-sections.md).

### 编辑部分

你可以通过点击 <picture><source srcset="/files/kN09oTFtAuyaxNIwWuCt" media="(prefers-color-scheme: dark)"><img src="/files/ffffa8d3208c93af4ead7061897fa70e6d0d612f" alt="The Edit icon in GitBook"></picture> **编辑** 要编辑的部分所在行中的按钮来更改每个部分的名称、图标和 slug。这将打开一个弹窗。编辑你想更改的字段，然后点击 **保存** 按钮。你也可以点击 **删除变体** 按钮来删除变体。

{% hint style="info" %}
更改部分的 slug 会更改其规范 URL。GitBook 将自动把旧 URL 重定向到新 URL。你还可以 [手动创建重定向](/docs/documentation/zh/docs-site/site-redirects.md).
{% endhint %}

组内的站点部分也可以选择显示描述，当鼠标悬停在部分组上时，该描述会出现在站点导航栏的下拉菜单中。请查看本页顶部的图片，了解这在你已发布的文档中会呈现什么样子。

如果你的站点支持多语言，你可以翻译部分标题和描述，使其与读者选择的语言一致。请参阅 [多语言部分](/docs/documentation/zh/docs-site/site-structure/multilingual-sections.md).

### 重新排序部分

你的站点会按它们在站点结构表中出现的顺序显示各部分。你可以通过拖动 **拖拽手柄** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" alt="The Options menu icon in GitBook"></picture> 并将其上下移动来重新排序。该部分中的所有空间也会随之移动。顺序更改会立即反映到你的站点上。

你也可以使用键盘选择并移动内容：按空格键选中一个部分，然后使用方向键将其上下移动。再次按空格键确认新位置。

### 设置默认部分

如果你的站点有多个部分，其中一个部分会用房子图标标记为默认部分<i class="fa-house">:house:</i>。访客进入你的站点时会显示该部分，并且它通过站点的根 URL 提供。其他部分各自都有一个追加到根 URL 的 slug。

要将某个部分设为默认部分，请点击 **操作菜单** <picture><source srcset="/files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="/files/d05670ba93b683794fb3fe95a9fc7ab5c7fceafd" alt="The Actions menu icon in GitBook"></picture> 中该部分所在行的，然后点击 **设为默认**.

### 移除部分

要从站点中移除一个部分，请点击 **设置** <picture><source srcset="/files/CG9bVSmdbJnQxrYiNbRI" media="(prefers-color-scheme: dark)"><img src="/files/9bcd313f64920f73d3606c61b9fbde5ddf8e3f6b" alt="The Settings icon in GitBook"></picture> 按钮，然后点击 **结构** 以找到你想移除的内容。点击 **编辑** <picture><source srcset="/files/kN09oTFtAuyaxNIwWuCt" media="(prefers-color-scheme: dark)"><img src="/files/ffffa8d3208c93af4ead7061897fa70e6d0d612f" alt="The Edit icon in GitBook"></picture> 要移除的部分旁边的按钮，然后点击 **删除** 弹窗左下角的按钮。这样会将该部分及其中的所有变体从已发布站点中移除，但不会删除这些空间本身或其中的内容。

要从站点中移除一个部分，请打开 **设置** 标签页，然后点击 **结构** 以找到你想移除的内容。

打开 **操作菜单** <picture><source srcset="/files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="/files/d05670ba93b683794fb3fe95a9fc7ab5c7fceafd" alt="The Actions menu icon in GitBook"></picture> 中你想移除的空间，并选择 **移除**.

{% hint style="success" %}
从你的站点中移除一个部分，会将其——以及其中的所有变体——从已发布站点中移除，但 **不会删除任何空间或其中的内容**.
{% endhint %}


---

# 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/zh/docs-site/site-structure/site-sections.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.
