> 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/publish-a-docs-site/public-publishing.md).

# 公开发布

如果你为公开受众创建了文档，你可以将其发布到网上。你发布到网上的空间可以被搜索引擎索引，并且任何人都可以访问。如果你不希望你的内容被搜索引擎索引，你也可以将其禁用——阅读更多关于这方面的信息 [如下](#publish-as-public).

不过，无论你如何发布内容，你仍然可以控制谁能 *编辑* 你的内容。而且只有你的主内容分支会被发布，因此任何 [变更请求](/docs/documentation/zh/collaboration/change-requests.md) 在合并之前都将保持私密。

### 发布为公开

要在网上公开发布你的文档，请前往你想发布的文档站点，然后点击 **发布** 按钮，然后选择 **公开** 选项。

### **发布时不进行搜索引擎索引**

默认情况下，你的网站会被搜索引擎索引。你也可以选择将其禁用——这意味着文档仍然可供网上所有人访问，但它们 *不会* 被 Google 等搜索引擎索引。

任何拥有你的文档链接的人仍然可以访问它们。如果你想发布文档的 Beta 版本，或者进行大规模用户测试，而又不希望潜在的重复内容影响你的 SEO，那么未被索引的文档站点会特别有帮助。

### 页面级搜索索引控制

你也可以在单个页面级别控制搜索索引。GitBook 提供两种搜索索引控制：

#### 内部搜索索引

控制页面是否被 GitBook 的内部搜索引擎和 Ask AI 功能索引。这会影响：

* 你 GitBook 区块内的内容搜索
* Ask AI 引用页面内容的能力

**外部搜索索引（网页爬虫）**

控制搜索引擎和网页爬虫（Google、ChatGPT 等）是否可以索引你的页面。这会影响：

* 通过搜索引擎进行 SEO 和可发现性
* 网页爬虫访问你的内容

#### **层级继承行为**

**搜索索引设置遵循层级继承模式：**

* **父页面控制**：当你在父页面上禁用搜索索引时，它会自动为其下方的所有子页面禁用索引。
* **子页面无法覆盖**：如果父页面已禁用搜索索引，子页面无法重新启用。
* **级联效果**：这会在整个页面层级中产生级联效果——在顶级页面上禁用索引会使整个区块都禁用索引。

这种层级行为可确保相关内容区块之间的索引策略保持一致，并防止在某个区块内意外暴露本应保持私密的内容。

{% hint style="info" %}
此功能适用于 [Premium 和 Ultimate 站点方案](https://www.gitbook.com/pricing).
{% 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/publish-a-docs-site/public-publishing.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.
