ResourcesBySelector コンポーネントは、frontmatter の pcx_content_type と products プロパティに基づいて、ドキュメントのリソースを取り込みます。
import { ResourcesBySelector } from "~/components";
<ResourcesBySelector
directory="workers/examples/"
types={["example"]}
filterables={["products"]}
/>-
directorystringsrc/content/docs/からの相対パスで、リソースを探すディレクトリです。たとえば Workers のチュートリアルならdirectory="workers/tutorials/"です。 -
filterablesstring[]フロントエンドのフィルタードロップダウンに表示する frontmatter プロパティの配列です。たとえば
filterables={["products"]}とすると、各ページのproductsfrontmatter で絞り込めます。 -
typesstring[]コンポーネントに取り込むコンテンツを絞り込む
pcx_content_type値の配列です。たとえばtypes={["example"]}です。 -
productsstring[]任意コンポーネントに取り込むコンテンツを絞り込む
products値の配列です。たとえばproducts={["D1"]}です。 -
showDescriptionsboolean任意(デフォルト true)falseにすると、関連ページのタイトルだけを表示し、説明文は表示しません。 -
showLastUpdatedboolean任意(デフォルト false)trueにすると、最終更新日を追加します。日付はupdatedfrontmatter 値 で設定します。