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 只列印,不會幫你寫檔案。