arc collections 是一个小的编写工具组,服务于 blocklet 的 blocklet.yaml 里 collections: 这一段声明——就是告诉运行时哪些 content/ 子树是可索引的集合,以及它们暴露哪些 face(web、sitemap、llms)。目前只有一个子命令。
arc collections <subcommand> [options]全局选项(见 总览):--json、--view、--instance / -i(作用在哪个本地 ARC 实例;省略即 default),以及 --home(实例根;要指定作用在哪个实例,用 --instance)。
arc collections scan
扫描一个站点的 content/ 目录,生成一段可以直接粘进 blocklet.yaml 的 collections: YAML 片段,不用手写这段声明。
用法
arc collections scan [dir] [options][dir](可选,默认.):站点根目录——包含content/的那个目录
示例(在一个有 content/ 树的站点根目录下跑;下面只展示生成的两个 collection,其余的形状一样)
$ arc collections scan .
# Paste into blocklet.yaml. mcp is intentionally omitted — opt-in only (epic #3657 W2).
collections:
articles:
type: local:articles
indexable:
- "content/articles/**/content.md"
faces:
web: true
sitemap: true
llms: [index, full]
docs:
type: local:docs
indexable:
- "content/docs/**/content.md"
faces:
web: true
sitemap: true
llms: [index, full]
...把打印出来的片段粘进目标 blocklet.yaml 的 collections: 键下;arc collections scan 只打印,不会帮你写文件。