> ## Documentation Index
> Fetch the complete documentation index at: https://labs.prompthon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 网站发布

<div className="not-prose my-4 rounded-md border border-gray-200 bg-gray-50 p-2 text-sm dark:border-gray-800 dark:bg-gray-900/40">
  <div className="mb-2 px-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">需要帮助？</div>

  <div className="flex flex-wrap gap-2">
    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://discord.gg/sDE2HhGTg4" target="_blank" rel="noreferrer">
      <Icon icon="discord" iconType="brands" size={14} />

      <span>在 Discord 提问</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/issues/new/choose" target="_blank" rel="noreferrer">
      <Icon icon="github" iconType="brands" size={14} />

      <span>提交 GitHub Issue</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/blob/main/zh-Hans/SUPPORT.md" target="_blank" rel="noreferrer">
      <Icon icon="life-ring" size={14} />

      <span>支持指南</span>
    </a>
  </div>
</div>

此仓库是为 Mintlify 文档站点准备的。已发布的手册页面以 MDX 为主，而仅供 GitHub 使用的运维文件，如 `README.md`、`CONTRIBUTING.md`、`SECURITY.md` 和 `SUPPORT.md`，则保持为 Markdown。

## 本地预览

Mintlify 当前的 CLI 需要 Node.js 20.17.0 或更高版本。

从仓库根目录运行本地预览：

```bash theme={null}
npx mint dev
```

发布前运行质量检查：

```bash theme={null}
npx mint validate
npx mint broken-links
```

## 部署

主 Mintlify 部署应通过 Mintlify GitHub 应用连接。Mintlify 会读取 `docs.json`，并在推送更改时发布文档站点。

正式文档站点发布于 `https://labs.prompthon.io`。

如果手册应显示在 Vercel 拥有的域名下，请在 Mintlify 子域名存在后，将 Vercel 配置为反向代理：

```json theme={null}
{
  "rewrites": [
    {
      "source": "/docs",
      "destination": "https://YOUR-MINTLIFY-SUBDOMAIN.mintlify.dev/docs"
    },
    {
      "source": "/docs/:match*",
      "destination": "https://YOUR-MINTLIFY-SUBDOMAIN.mintlify.dev/docs/:match*"
    }
  ]
}
```

在确认真实的 Mintlify 子域名前，不要添加那个已启用的 `vercel.json`。

## 分析与 Search Console

Mintlify 分析功能应用于文档原生使用信号，例如阅读量最高的页面、内部搜索、搜索结果点击、反馈和助手活动。可在 Mintlify 仪表盘或通过已认证的 CLI 会话 `npx mint analytics` 访问相关报告。

GA4 通过 Mintlify `docs.json` 集成配置，测量 ID 为 `G-K26DVPPVLY`。GA4 用于外部报表、引流来源分析和点击路径探索。

Google Search Console 应为 `https://labs.prompthon.io/` 设置 URL 前缀属性。验证 token 已以 `google-site-verification` meta 标签的形式提交到 `docs.json`。部署完成后，验证该属性并提交 `https://labs.prompthon.io/sitemap.xml`。

## 兼容性策略

Mintlify 是面向学生的阅读层。它应该发布精选的 MDX 页面，而不是每一个原始项目工件。

| 工件类型               | 仓库策略                                 | 网站策略                           |
| ------------------ | ------------------------------------ | ------------------------------ |
| MDX 页面             | 作为源文档提交并维护                           | 通过 `docs.json` 发布精选页面          |
| GitHub 运维 Markdown | 仅保留给 README、贡献、支持、安全和模板等 GitHub 原生场景 | 仅在需要时从站点链接                     |
| Python 源码          | 作为 starter/source code 提交            | 从指南页面链接，或之后将选定文件转换为教程页面        |
| Jupyter notebooks  | 除非有意提升，否则不要放入手册仓库                    | 在发布为课程前将选定 notebook 转换为 MDX    |
| HTML/CSS/JS 示例     | 当它们是源文件或演示时提交                        | 链接到 GitHub，或单独托管精选演示           |
| 已构建的 HTML/输出文件     | 默认避免发布                               | 仅在有意作为演示推广时单独托管                |
| 原始参考资料             | 默认保留在已发布站点之外，并由此仓库忽略                 | 使用 `.mintignore` 将其排除在公开文档站点之外 |

仓库级 `.gitignore` 会有意忽略原始 `references/` 归档。等这些内容准备好面向学生站点时，再将选定材料提升为 MDX 页面。
