メインコンテンツへスキップ

arc collections

arc collections には blocklet.yaml の collections: 宣言用の作成ツールがあります —— 現時点では content/ をスキャンしてそのフラグメントを生成します。

arc collections は、blocklet の blocklet.yaml にある collections: 宣言のための小さな作成ツール群です —— これは、どの content/ サブツリーがインデックス可能なコレクションで、それらがどの face(web、sitemap、llms)を公開するかをランタイムに伝えるブロックです。現在はサブコマンドが 1 つだけあります。

bash
arc collections <subcommand> [options]

グローバルフラグ(概要 を参照):--json--view--instance / -i(どのローカル ARC インスタンスか;省略すると default)、および --home(インスタンスのルート;どのインスタンスにするかを選ぶには --instance を使う)。

arc collections scan

サイトの content/ ディレクトリをスキャンし、宣言を手で書く代わりに、blocklet.yaml に貼り付けられる collections: の YAML フラグメントを出力します。

使用法

bash
arc collections scan [dir] [options]
  • [dir](省略可、デフォルト .):サイトのルート —— content/ を含むディレクトリ

content/ ツリーを持つサイトルートで実行;出力されたコレクションのうち 2 つを示す、残りも同じ形になる)

bash
$ 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.yamlcollections: キーに貼り付けてください。arc collections scan は出力するだけで、ファイルを書き込むことはありません。