外观
Cloudflare Pages 部署
GitHub 仓库
把整个 cheapemail-api-docs 目录作为独立仓库上传,确认没有提交真实 API Key 或 Secret。
Pages 构建配置
| 配置 | 值 |
|---|---|
| Framework preset | VitePress |
| Build command | npm run docs:build |
| Build output directory | docs/.vitepress/dist |
| Root directory | / |
| Node.js | 20 或 22 |
这是纯静态文档,不需要 Functions、数据库或服务端环境变量。
自定义域名
在 Pages 的 Custom domains 添加:
text
docs.cheapemail.cc主站导航
在 CheapEmail 后台添加自定义导航:
json
{
"title": {
"zh-CN": "API 文档",
"zh-TW": "API 文件",
"en-US": "API Docs"
},
"url": "https://docs.cheapemail.cc/",
"link_type": "external",
"target": "_blank",
"icon": "document",
"enabled": true,
"sort_order": 10
}当前主站会把自定义导航追加在内置“关于”之后,因此它会显示在“关于”的右侧。
安全检查
- GitHub 仓库中不能出现真实 API Key 或 Secret。
- 下载版
test.py只能包含your_api_key和your_api_secret占位符。 - API Secret 由用户填写在自己下载到本地的脚本中,不经过文档网站。
