Skip to content

Commit 5918ec9

Browse files
committed
[Docs Site] Improve resources-by-selector docs
1 parent 28cb6c1 commit 5918ec9

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

src/components/ResourcesBySelector.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const resources = await getCollection("docs", ({ data }) => {
2727
const description = page.data.description;
2828
return (
2929
<li>
30-
<a href={`/${page.id}/`}>{page.data.title}</a>
31-
{description && `: ${description}`}
30+
<!-- prettier-ignore -->
31+
<a href={`/${page.id}/`}>{page.data.title}</a>{description && `: ${description}`}
3232
</li>
3333
);
3434
})

src/content/docs/style-guide/components/resources-by-selector.mdx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,31 @@
22
title: Resources by selector
33
---
44

5+
import { Type, MetaInfo } from "~/components";
6+
7+
The `ResourcesBySelector` component allows you to pull in documentation resources based on the `pcx_content_type`, `tags` and `products` frontmatter properties.
8+
9+
## Component
10+
511
```mdx live
612
import { ResourcesBySelector } from "~/components";
713

814
<ResourcesBySelector
9-
types={["example"]}
10-
tags={["Authentication Method"]}
11-
products={["Cloudflare One"]}
15+
tags={["AI"]}
16+
types={["reference-architecture","design-guide","reference-architecture-diagram"]}
1217
/>
13-
```
18+
```
19+
20+
### Inputs
21+
22+
- `types` <Type text="string[]" />
23+
24+
An array of `pcx_content_type` values to filter by.
25+
26+
- `tags` <Type text="string[]" /> <MetaInfo text="optional" />
27+
28+
An array of `tags` values to filter by.
29+
30+
- `products` <Type text="string[]" /> <MetaInfo text="optional" />
31+
32+
An array of `products` values to filter by.

0 commit comments

Comments
 (0)