Interface AddSiteDTO
git 源站点注册接口的请求体。
| Name | Data Type | Required | Description |
|---|---|---|---|
| name | string | Yes | 站点名,`^[a-z][a-z0-9-]*$`,保留名 `api` 不可用 |
| domain | string | No | 绑定域名,全局唯一 |
| sourceUrl | string | Yes | git 仓库地址 |
| ref | string | No | git 分支或标签,缺省为仓库默认分支 |
| path | string | No | 站点源在仓库内的子目录(docdoc.json 所在目录),相对路径且不允许 .. 段;缺省为仓库根目录 |
| docs | array | No | 仅构建的子文档名数组,取值为仓库 docdoc.json 中 docs 数组各条目的 name;缺省构建全部 |
type AddSiteDTO = {
/** 站点名,`^[a-z][a-z0-9-]*$`,保留名 `api` 不可用 */
name: string
/** 绑定域名,全局唯一 */
domain?: string
/** git 仓库地址 */
sourceUrl: string
/** git 分支或标签,缺省为仓库默认分支 */
ref?: string
/** 站点源在仓库内的子目录(docdoc.json 所在目录),相对路径且不允许 .. 段;缺省为仓库根目录 */
path?: string
/** 仅构建的子文档名数组,取值为仓库 docdoc.json 中 docs 数组各条目的 name;缺省构建全部 */
docs?: string[]
}{
"name": "my-docs",
"domain": "docs.example.com",
"sourceUrl": "https://github.com/acme/docs.git",
"ref": "main",
"path": "docs",
"docs": [
"handbook",
"guides"
]
}