# 站点自定义

您可以自定义已发布文档的外观，让用户界面与内容语言保持一致，等等。

您可以将自定义应用于整个文档站点，作为站点级主题，或应用于单个变体和站点部分。

<figure><img src="/files/2be2d03fd8fcc4e6d5bd045a2f570d1e25a465ec" alt="A GitBook screenshot showing a customized docs site"><figcaption><p>您可以使用 GitBook 内置的自定义选项创建各种站点设计。</p></figcaption></figure>

### 为包含多个部分或变体的站点进行自定义

如果您的文档站点包含多个部分或变体，您可以分别控制每个部分的自定义设置。

使用顶部的下拉菜单选择整个站点或特定的站点部分 **自定义** 面板。

* **站点级设置** – 这些设置会自动应用于所有已关联的空间。
* **部分或变体特定设置** – 如果您使用站点部分或变体，您可以设置特定的自定义内容，以覆盖默认的站点级设置。

<figure><img src="/files/03e79f95f140a678f1bf1501853fd8965eea7274" alt="A GitBook screenshot showing the customization panel"><figcaption><p>GitBook 中的自定义面板。</p></figcaption></figure>

{% hint style="warning" %}
您对特定站点部分所做的更改将覆盖站点级自定义设置，即使您之后再次更改站点级设置也是如此。

您可以通过点击 **重置** 按钮 <picture><source srcset="/files/pqrwkdhGuOQlk1cWXLgI" media="(prefers-color-scheme: dark)"><img src="/files/db6be9765006db26f1933c5b866a7e5283387877" alt="The Reset icon in GitBook"></picture> 旁边的空间选择器，将自定义覆盖恢复为站点级默认设置。
{% endhint %}

### 什么算作“高级自定义”？

每位 GitBook 用户都可以在其文档站点上使用基础自定义选项。Premium 或 Ultimate 站点方案用户还可以使用高级自定义功能，进一步调整文档以符合其品牌。

高级自定义选项包括：

* **自定义徽标** – 添加一个徽标，以替换文档站点顶部的表情符号和标题。
* **图标样式** - 更改文档站点中页面图标的粗细和样式。
* **自定义字体** – 更改文档站点的主字体和等宽字体。
* **页脚** – 在文档底部的页脚中添加自定义徽标、版权文本和导航。
* **粗体和渐变主题** – 使用这些新主题更改页眉的背景颜色，或为整个站点添加渐变背景。
* **语义颜色** – 更改发布内容中提示块的背景颜色，以及代码块的样式。
* **代码主题** – 使用预设主题或自适应主题（会使用您站点的颜色）更改已发布文档中代码和 API 块的外观。

### 哪些内容无法自定义？

上述选项为您提供了许多自定义空间的方式，但有少数内容无论 [您选择的方案](/docs/documentation/zh/zhang-hu-guan-li/plans.md).

1. 都无法自定义页面上元素的布局（不过， *为* 可以 [隐藏某些页面上的特定元素](/docs/documentation/zh/creating-content/content-structure/page.md)).
2. 无法将自定义代码（例如 CSS、HTML 或 JS）直接插入到您的 GitBook 站点中。我们已与许多流行工具集成，并为 [丰富嵌入](/docs/documentation/zh/creating-content/blocks/embed-a-url.md) 提供了更多支持。
3. 无法移除已发布文档中出现的较小的“由 GitBook 驱动”链接。


---

# Agent Instructions: 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:

```
GET https://gitbook.com/docs/documentation/zh/docs-site/customization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
