> 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/guan-li-ni-de-zhan-dian/site-structure.md).

# 站点结构

你网站上的内容位于其 [部分中](/docs/documentation/zh/chuang-jian-nei-rong/content-structure/space.md)。你可以添加一个或多个部分。GitBook 会发布每个部分，并处理它们之间的导航。

## 内容类型

你网站中的内容可以作为两种不同的内容类型之一，这决定了 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="/files/8c1112fe0dfefe229b2a53fe7d7299fb9fc71274">/files/8c1112fe0dfefe229b2a53fe7d7299fb9fc71274</a></td><td><a href="/files/3d0f0e6d0b070eb822d0b2fa89552e60555d880e">/files/3d0f0e6d0b070eb822d0b2fa89552e60555d880e</a></td><td><a href="/pages/d6842a8aab29e260bcaf1e0f07ac87c77eb8d47e">/pages/d6842a8aab29e260bcaf1e0f07ac87c77eb8d47e</a></td><td></td><td><a href="/files/a2606116bce287584b192bc5a38b5eb1fa757b50">/files/a2606116bce287584b192bc5a38b5eb1fa757b50</a></td></tr><tr><td><strong>内容变体</strong></td><td>发布同一内容的多个版本——非常适合本地化、版本管理等。</td><td><a href="/files/59cbe2e489533e054c107de5eb42203552141f2c">/files/59cbe2e489533e054c107de5eb42203552141f2c</a></td><td><a href="/files/66bf22917ed23903deb290aa7839d6b13a7e8be5">/files/66bf22917ed23903deb290aa7839d6b13a7e8be5</a></td><td><a href="/pages/8827b5487f591a8e224b6afeecca357a080c2852">/pages/8827b5487f591a8e224b6afeecca357a080c2852</a></td><td></td><td><a href="/files/f63c83ccc546a037ef537acb2b06510ed5174d1e">/files/f63c83ccc546a037ef537acb2b06510ed5174d1e</a></td></tr></tbody></table>

## 管理站点结构

通过管理站点结构，你还可以管理站点顶部导航栏。这个导航栏允许用户跳转到不同的部分和组。

从以下位置打开结构编辑器 **站点结构**，在 **常规** 中，在站点侧边栏中。你可以在这里查看站点的全部内容，并将其分为部分和变体。

你的站点最初只有一个部分，名称就是你站点的名称，并且只有一个变体，包含你在站点设置过程中创建的内容。

<figure><img src="/files/bb94519610a0b06e715f503a1ce96eecfd048c9b" alt="A GitBook screenshot showing a docs site&#x27;s structure"><figcaption><p>已发布文档站点的结构。</p></figcaption></figure>

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

要添加一个 [部分](/docs/documentation/zh/guan-li-ni-de-zhan-dian/site-structure/site-sections.md)，请点击 **添加部分** 按钮，然后选择要添加的内容。新的部分随后会添加到表格中，并作为站点顶部的标签页供访客访问。

要添加一个 [变体](/docs/documentation/zh/guan-li-ni-de-zhan-dian/site-structure/variants.md)，请点击 **添加变体** 按钮，然后选择要添加的内容。新的变体随后会添加到所选部分中的变体列表里，并作为你站点变体下拉菜单中的选项供访客使用。

当你添加内容——无论是变体还是部分——都会根据其标题生成名称和 slug。

### 更改部分或变体

<div data-full-width="false"><figure><img src="/files/29d579c521edfedf580d7a5c9878f655389ec628" 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="/files/ffffa8d3208c93af4ead7061897fa70e6d0d612f" alt="The Edit icon in GitBook"></picture> 按钮来更改每个部分和变体的名称及 slug。这将打开一个弹窗。编辑你想修改的字段，然后点击 **保存** 按钮进行保存。

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

{% hint style="info" %}
slug 在整个组织内是唯一的——即使在不同站点之间，每个路径也只能用于一个站点。如果你看到“路径已被占用”的错误，说明另一个站点已经在使用该 slug。请选择一个稍有不同但仍能体现内容含义的 slug。
{% endhint %}

要替换一个部分或变体，首先点击其 **编辑** <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/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" alt="The Options menu icon in GitBook"></picture> 中出现的顺序显示部分和变体。你可以抓住

，然后上下移动来重新排序。更改后的顺序会立即反映在你的站点上。你也可以使用键盘来选择并移动内容。按空格键选中一个部分或变体，然后使用方向键上下移动。再次按空格键确认新位置。

### 设置默认内容

如果你的站点中有多个部分，其中一个部分会被标记为 **默认**。当访客进入你的站点时会显示该部分，并从站点根 URL 提供。其他部分各自都有一个追加到根 URL 后面的 slug。

如果一个部分中有多个变体，其中一个变体会被标记为默认。与部分一样，默认变体会在访客进入你的站点或访问某个部分时显示。其他变体各自都有一个追加到该部分 URL 后面的 slug。

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

{% hint style="info" %}
将内容设为默认后，会移除其 slug 字段，因为它将改为从该部分根路径提供。GitBook 会将旧 slug 重定向到相应路径，以确保访客仍能看到你的内容。
{% endhint %}

### 从站点中移除内容

要从站点中移除一个部分或变体，请从 **站点结构**，在 **常规** 在站点侧边栏中打开结构编辑器，然后找到你想移除的内容。

打开 **操作菜单** <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" %}
从你的站点中移除内容会将其从已发布站点中删除，但 **不会删除内容本身** ——你仍然可以在 [全部内容](/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 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/guan-li-ni-de-zhan-dian/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.
