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

# 公开发布

将你的文档公开发布到网络上，让每个人都能访问

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

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

### 以公开方式发布

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

### **发布但不被搜索引擎收录**

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

它们仍然可以被任何拥有你文档链接的人访问。未被收录的文档站点在你想发布文档的测试版，或在不因可能重复的内容影响 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/fa-bu/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.
