Antora
$ antora 官方出品 低风险Antora(antora)可按 antora-playbook.yml 聚合多个 Git 仓库及分支/标签中的 AsciiDoc 内容,生成统一的版本化静态文档门户。它原生提供 --log-format json、--log-failure-level warn 与 --fetch 参数,方便 CI 与 Agent 进行确定性校验。
npm install @antora/cli 克隆/读取多仓库 Git 分支并编译跨组件 AsciiDoc 交叉引用需通过 antora 在构建主机本地完成。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 --log-format json(管道输出时自动启用)、--log-level、--log-failure-level 与 --to-dir,全程无交互。
- Native
--log-format jsonNDJSON logging --log-failure-level warnenforces strict CI failure on broken xrefs
仅在本地输出静态站点文件;构建时会拉取 antora-playbook.yml 配置的 Git 仓库及扩展包。
- Local site output only; fetches remote Git content sources defined in playbook
标准 Node.js npm 包(@antora/cli 与 @antora/site-generator),支持 macOS、Linux 与 Windows。
- Cross-platform
npm/npxdistribution
专为跨仓库、多版本的企业级 AsciiDoc 文档门户设计,但初期配置比单仓库工具更重。
- Native Git branch/tag content aggregation and cross-component xrefs
Antora 官方项目(OpenDevise / Asciidoctor 生态),基于 MPL-2.0 协议活跃维护。
- Official Antora ecosystem maintenance
docs.antora.org 提供详尽的 CLI 与日志参数文档。
- Official docs at docs.antora.org/antora/latest/cli/
安全边界、鉴权与放权指南
公开 Playbook 无需认证;拉取私有 Git 仓库时读取 GIT_CREDENTIALS、.netrc 或本地 SSH 密钥。
100% 免费开源(MPL-2.0)。
# Antora Agent Rules - Always pass `--log-format json --log-failure-level warn` so broken cross-repo xrefs emit structured JSON errors and fail the build. - Omit `--fetch` during local iterative checks if cached Git mirrors are already up to date. - Review remote Git source URLs and `GIT_CREDENTIALS` scope before running untrusted playbooks.
Agent 高频安全命令配方
只读查询(安全推荐)
npx antora --version
输出已安装的 @antora/cli 与站点生成器版本,不运行 Playbook。
受控写入与预演
npx antora --log-format json --log-failure-level warn antora-playbook.yml
将 Playbook 编译至 build/site/,输出 NDJSON 日志,并在出现警告或断链时返回失败退出码。
核心优势
- + 结构化
--log-format json(NDJSON)日志配合--log-failure-level warn可精准捕获跨仓库断链。 - + 原生擅长聚合多个 Git 仓库和分支/标签的版本化 AsciiDoc 组件。
注意事项与踩坑点
- ! 需同时配置
@antora/cli、@antora/site-generator、antora-playbook.yml及 UI 主题包。 - ! 构建远程 Playbook 时除非使用本地工作树或缓存镜像,否则需要 Git 网络访问。