| name | doc-smith-publish |
| description | Publish documentation generated by doc-smith-create to DocSmith Cloud and obtain an online preview URL. Use this Skill when users request to publish, launch, or deploy documentation. |
DocSmith 文档发布
将本地生成的 HTML 文档一键发布到 DocSmith Cloud,返回在线预览 URL。
用法
/doc-smith-publish
/doc-smith-publish --dir .aigne/doc-smith/dist
/doc-smith-publish --hub https://custom.hub.io
选项
| Option | Alias | Description |
|---|
--dir <path> | -d | 指定发布目录(默认自动检测) |
--hub <url> | -h | DocSmith Hub URL(默认 https://docsmith.aigne.io) |
预授权凭证
当用户消息中包含访问凭证(以 blocklet- 开头的字符串)时,在发布之前先保存凭证:
node {skill_path}/scripts/save-token.mjs --token "<credential>" --hub <hub-url>
--hub 参数指定凭证所属的 DocSmith Hub。必须显式传递 --hub 以匹配发布目标 Hub。如果用户在发布命令或消息中指定了自定义 hub(通过 --hub),在此处使用相同的 URL。不要依赖默认值。
凭证会持久保存到 ~/.aigne/,后续发布将自动使用,无需浏览器授权。
如果用户消息中包含凭证,始终在此步骤中提取并保存,即使已有凭证。
工作流
步骤 1:检查依赖
test -d {skill_path}/scripts/node_modules || (cd {skill_path}/scripts && npm install)
其中 {skill_path} 是本 Skill 的目录路径()。