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

# 发布文档站点

将你的文档作为文档站点发布到互联网上

完成内容的编写、编辑或导入后，将其发布给所选受众。

文档站点的内容位于其 [分区](https://gitbook.com/docs/documentation/zh/manage-your-site/site-structure.md)中。你编辑的结构就是访客看到的结构。新建分区默认为草稿，因此你可以控制已发布站点上显示的内容。

<figure><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-d8c0ec68e6bf9df9dd434dfa4a75408c69b15f8c%2F25_12_10_publishing_documentation_publish_docs%402x.png?alt=media" alt="A GitBook screenshot showing the organization Home"><figcaption><p>组织主页。</p></figcaption></figure>

### 创建文档站点

创建文档站点：

1. 在组织的 **主页**中，点击 **+** 旁边的图标： **站点**.
2. 输入一个访客能识别的名称。
3. 点击 **创建**.
4. 选择一个起点：文档模板、导入内容、OpenAPI 规范、空白分区或 Git Sync。

如需完整的设置指南，请参阅 [快速入门](https://gitbook.com/docs/documentation/zh/getting-started/quickstart.md).

{% hint style="info" %}
你可以在 **设置** → **成员**中管理站点权限。这样，你就可以独立于组织设置，分别控制谁可以查看或编辑各个站点。详情请参阅 [角色](https://gitbook.com/docs/documentation/zh/collaborate/member-management/roles.md) 。
{% endhint %}

### 发布文档站点

发布站点：

1. 在组织的 **主页**中，打开你的站点。
2. 点击站点页眉中的 **发布** 。

站点默认公开。你可以在 **设置** → **受众**中更改站点的可见性。请参阅 [站点设置](https://gitbook.com/docs/documentation/zh/manage-your-site/site-settings.md).

选择以下受众选项之一：

<table data-view="cards"><thead><tr><th></th><th></th><th></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 data-type="image">封面图片（深色）</th><th data-hidden data-type="image">封面图片（深色）</th><th data-hidden data-card-cover-dark data-type="image">封面图片（深色）</th></tr></thead><tbody><tr><td><strong>公开</strong></td><td>将文档公开发布到网上。</td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-be3daa5e8d7ca69c4040bba51d9799b96fe08751%2F25_12_12_public.png?alt=media">25_12_12_public.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/publish-a-docs-site/public-publishing.md">公开发布</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-fb86f7029d8eedec3e0c030dd400ef9a1d613330%2F25_12_12_public_1.png?alt=media">25_12_12_public_1.png</a></td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-fb86f7029d8eedec3e0c030dd400ef9a1d613330%2F25_12_12_public_1.png?alt=media">25_12_12_public_1.png</a></td></tr><tr><td><strong>通过分享链接私密发布</strong></td><td>通过私密分享链接发布文档。</td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-7d3d6e45e4cc3d6b96638a7b40e9e54a90c8dfbb%2F25_12_12_share_links_1.png?alt=media">25_12_12_share_links_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/share-links.md">通过分享链接进行私密发布</a></td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-9a405bebb212b6ff7a5525aa25aec1cab89e0df7%2F25_12_12_share_links.png?alt=media">25_12_12_share_links.png</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-dd9c05f3858e3e8e12b30fed6f921ad1e4fd9626%2F25_01_06_share_links%402x.png?alt=media">25_01_06_share_links@2x.png</a></td></tr><tr><td><strong>经身份验证的访问</strong></td><td>在已发布的文档前设置 OAuth 登录验证。</td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-4768a66764e29b95017a1566fbe332ee15d7766e%2F25_12_10_auth_access_1.png?alt=media">25_12_10_auth_access_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access.md">已认证访问</a></td><td></td><td></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-eefffa65f90914c204fc17fd7d99039e9e97750a%2F25_12_10_auth_access.png?alt=media">25_12_10_auth_access.png</a></td></tr></tbody></table>

### 预览站点

点击站点页眉中的 **预览** ，即可查看访客看到的内容——无论是在发布站点之前，还是在修改内容期间。检查内容和自定义设置，一切就绪后再发布。

### 删除或取消发布文档站点

要取消发布站点，请打开 **设置** → **常规** 并选择 **取消发布站点**。确认后，访客将无法再访问该站点。

取消发布不会影响您的账单。如需调整付费站点数量，请在组织的账单设置中更新套餐。

#### 取消发布或删除后，我的站点仍可访问

如果您仍能打开该网址，通常是因为旧版本被缓存了——可能在您的浏览器、CDN 或搜索引擎结果中。若要确认该站点已不再上线，请在无痕窗口中打开网址，或清除此站点的浏览器缓存后重新加载。

#### 我的站点仍显示在搜索引擎中

搜索引擎需要时间更新索引，因此已取消发布的站点可能会在搜索结果中显示一段时间。具体时长取决于多种因素，例如抓取频率以及链接到该页面的其他站点数量。

如需加快此过程，请通过 Google Search Console 请求重新抓取：打开 **网址检查** 标签页，输入网址，然后点击 **请求编入索引**。Google 会审核该请求；如果页面已不再发布，便会将其从索引中移除。

您可以在 Google 中搜索 `site:` 后接您站点的网址，检查站点是否仍在索引中。

删除文档站点：

1. 打开 **设置** → **常规**.
2. 选择 [**删除站点**](https://gitbook.com/docs/documentation/zh/manage-your-site/site-settings.md#delete-site).

删除站点会永久移除其设置和自定义项。您的内容仍保留在组织中——可在 [所有内容](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/content-structure/all-content.md).


---

# 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/publish/publish-a-docs-site.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.
