> 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/manage-your-site/site-structure/site-sections.md). Agents can also search and read this documentation through its [MCP server](https://gitbook.com/docs/~gitbook/mcp).

# 分区

在一个已发布的站点中组织独立的产品、受众或主题。

{% hint style="info" %}
此功能适用于 Ultimate 站点套餐。
{% endhint %}

<figure><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-9b9015079b5105215a977fdfd3890318a4bf4af2%2F25_12_10_site_sections%402x.png?alt=media" alt="A GitBook screenshot showing sections on a docs site"><figcaption><p>包含分区的 GitBook 站点示例</p></figcaption></figure>

分区可让你在一个站点中集中管理文档。你可以使用分区来整理不同的产品，也可以通过定制内容服务不同的受众。

将分区分组，即可在导航栏中创建下拉菜单。分组可以为站点添加层级结构。

### 分区还是变体？

每个分区都包含自己的内容。不同的文档领域适合使用分区来组织，例如产品、受众或主题。

对于同一内容的不同版本，请使用 [内容变体](https://gitbook.com/docs/documentation/zh/manage-your-site/site-structure/variants.md)。不同版本包括本地化内容和产品的历史版本。

### 添加分区

添加分区的步骤：

1. 在站点侧边栏中打开 **站点结构**.
2. 在表格下方，点击 **新建分区**.
3. 选择要添加的内容。

分区会显示在表格中，也会作为选项卡显示在已发布的站点上。

<figure><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-e432c8071850ada9273154fb24a6a0fb9d782d8b%2F25_12_10_structure_tree%402x.png?alt=media" alt="A GitBook screenshot showing site section structure"><figcaption><p>使用分区为文档添加结构。</p></figcaption></figure>

### 创建分区组

分区组会在一个标题下创建导航下拉菜单。分组后的分区可以添加可选说明，该说明会显示在分区标题下方。

创建分组的步骤：

1. 在 **新建分区**旁边，点击箭头。
2. 选择 **新建分区组**.
3. 输入分组名称。
4. 点击 **添加分区**.
5. 添加现有分区，或选择新内容。

若要仅向部分访客显示某个分区组，请打开该组的操作菜单，并将 **网站受众** 设为 **有条件**。请参阅 [条件分区组](https://gitbook.com/docs/documentation/zh/publish/adaptive-content/adapting-your-content.md#conditional-section-groups).

如果站点支持多种语言，请翻译分组标题、分区标题和说明。请参阅 [多语言分区](https://gitbook.com/docs/documentation/zh/manage-your-site/site-structure/multilingual-sections.md).

### 编辑分区

编辑分区的步骤：

1. 在分区对应的表格行中，点击 **编辑**.
2. 更改名称、图标或别名。
3. 点击 **保存**.

要删除分区，请点击 **删除** （位于左下角）。

{% hint style="info" %}
更改分区的别名会更改其规范 URL。GitBook 会从旧 URL 创建重定向。你也可以 [手动创建重定向](https://gitbook.com/docs/documentation/zh/publish/site-redirects.md).
{% endhint %}

### 隐藏分区

**在站点导航中显示** 用于控制分区是否显示在站点顶部导航中。隐藏分区会将其从已发布站点的导航中移除，但不会删除分区或其内容。

隐藏分区的步骤：

1. 在站点侧边栏中打开 **站点结构**.
2. 在分区对应的表格行中，点击 **编辑**.
3. 关闭 **在站点导航中显示**.
4. 点击 **保存**.

此设置用于控制分区是否可见。它与 **隐藏页面**不同；后者会将页面从分区目录中隐藏。访客在已发布站点的导航中看不到隐藏的分区。

### 重新排序分区

各分区的显示顺序与 **网站结构** 表格中的顺序相同。要重新排列分区，请向上或向下拖动其拖动手柄。分区内容会随之移动。新顺序会立即显示在你的网站上。

使用键盘操作：

1. 按 **空格键** 选中一个分区。
2. 按方向键移动分区。
3. 按 **空格键** 确认。

### 设置首页分区

访客打开你的网站时会看到首页分区。该分区会加载在网站的根 URL 下。其他分区则会在根 URL 后添加路径别名。

要设置首页分区：

1. 在分区所在的表格行中，打开 **操作** 菜单。
2. 点击 **设为首页**.

### 设置首页变体

如果一个分区有多个变体，请选择访客首先打开的变体。

要设置首页变体：

1. 打开 **网站设置**.
2. 点击 **结构**.
3. 点击要更新的分区。
4. 找到访客首先打开的变体。
5. 点击 **设为首页**.

### 移除分区

要移除分区：

1. 在站点侧边栏中打开 **站点结构**.
2. 打开分区的 **操作** 菜单。
3. 点击 **移除**.

{% hint style="success" %}
移除分区会取消发布该分区及其变体，但不会删除内容。你仍可在 [所有内容](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/content-structure/all-content.md).
{% 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 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/zh/manage-your-site/site-structure/site-sections.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.
