The ResourcesBySelector component allows you to pull in documentation resources based on the pcx_content_type and products frontmatter properties.
import { ResourcesBySelector } from "~/components";
<ResourcesBySelector
directory="workers/examples/"
types={["example"]}
filterables={["products"]}
/>-
directorystringThe directory to search for resources in, relative to
src/content/docs/. For example, for Workers tutorials,directory="workers/tutorials/". -
filterablesstring[]An array of frontmatter properties to show in the frontend filter dropdown. For example,
filterables={["products"]}will allow users to filter based on each pages'productsfrontmatter. -
typesstring[]An array of
pcx_content_typevalues to filter which content gets pulled into the component. For example,types={["example"]}. -
productsstring[]optionalAn array of
productsvalues to filter which content gets pulled into the component. For example,products={["D1"]}. -
showDescriptionsbooleanoptional (default true)If set to
false, will only show the titles of associated pages, not the showDescriptions -
showLastUpdatedbooleanoptional (default false)If set to
true, will add the last updated date, which is added in theupdatedfrontmatter value.