Skip to content

Commit 1d93d62

Browse files
authored
Added curl / apirequest to curl examples (#20801)
1 parent 12d33d3 commit 1d93d62

26 files changed

+247
-188
lines changed

src/content/docs/style-guide/api-content-strategy/guidelines-for-curl-commands.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ sidebar:
66

77
---
88

9+
We follow several formatting conventions for cURL commands.
10+
11+
## Components
12+
13+
To automatically incorporate our conventions into your examples, use:
14+
15+
- [`APIRequest`](/style-guide/components/api-request/): For examples hitting endpoints in the Cloudflare API schema.
16+
- [`CURL`](/style-guide/components/curl/): For other cURL commands.
17+
18+
## Paramter names
19+
920
Use long parameter names for clarity:
1021

1122
* `--header` (instead of `-H`)

src/content/docs/style-guide/components/directory-listing.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ styleGuide:
44
component: DirectoryListing
55
---
66

7-
Use `<DirectoryListing />` to display the directory of a specific folder, which appears as a list of links.
7+
import { Render } from "~/components";
8+
9+
<Render file="directory-listing-definition" />
810

911
We also have an optional `descriptions` parameter which - if present - adds in the text from the [front matter `description`](/style-guide/frontmatter/) field.
1012

@@ -13,3 +15,7 @@ import { DirectoryListing } from "~/components";
1315

1416
<DirectoryListing folder="workers/wrangler" descriptions />
1517
```
18+
19+
## Associated content types
20+
21+
- [Navigation](/style-guide/documentation-content-strategy/content-types/navigation/)

src/content/docs/style-guide/components/github-code.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,8 @@ This should be represented as starting `<docs-tag name="no-logging">` and closin
142142

143143
**type**: `object`
144144

145-
Props to pass to the [Expressive Code component](https://expressive-code.com/key-features/code-component/).
145+
Props to pass to the [Expressive Code component](https://expressive-code.com/key-features/code-component/).
146+
147+
## Associated content types
148+
149+
- [Tutorial](/style-guide/documentation-content-strategy/content-types/tutorial/)

src/content/docs/style-guide/components/last-reviewed.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ import { LastReviewed } from "~/components"
2323
title: My Tutorial
2424
updated: 2024-07-01
2525
---
26-
```
26+
```
27+
28+
## Associated content types
29+
30+
- [Tutorial](/style-guide/documentation-content-strategy/content-types/tutorial/)

src/content/docs/style-guide/components/list-tutorials.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ styleGuide:
88
import { ListTutorials } from "~/components";
99

1010
<ListTutorials />
11-
```
11+
```
12+
13+
## Associated content types
14+
15+
- [Tutorial](/style-guide/documentation-content-strategy/content-types/tutorial/)

src/content/docs/style-guide/components/public-stats.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ styleGuide:
44
component: PublicStats
55
---
66

7-
The `PublicStats` component allows you to reference specific values about Cloudflare's network without maintaining those values in multiple files.
7+
import { Render } from "~/components";
8+
9+
<Render file="public-stats-definition" />
810

911
Refer to the examples below for more information.
1012

@@ -23,3 +25,11 @@ Cloudflare also has <PublicStats id="network_peers" />.
2325
If you need more stats or to update these stats, submit a pull request to update [PublicStats.astro](https://github.com/cloudflare/cloudflare-docs/blob/production/src/components/PublicStats.astro)
2426

2527
:::
28+
29+
## Associated content types
30+
31+
The `PublicStats` component is commonly used on the following type of pages:
32+
33+
- [Overview](/style-guide/documentation-content-strategy/content-types/overview/)
34+
- [Reference Architecture](/style-guide/documentation-content-strategy/content-types/reference-architecture/)
35+
- [Reference Architecture Diagrams](/style-guide/documentation-content-strategy/content-types/reference-architecture-diagram/)

src/content/docs/style-guide/documentation-content-strategy/content-types/3rd-party-integration-guide.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ instructional, straightforward
1313

1414
## content_type
1515

16-
`integration-guide`
16+
```yaml
17+
pcx_content_type: integration-guide
18+
```
19+
20+
For more details, refer to [`pcx_content_type`](/style-guide/frontmatter/custom-properties/#pcx_content_type).
1721

1822
## Structure
1923

src/content/docs/style-guide/documentation-content-strategy/content-types/changelog.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ instructional, straightforward
1313

1414
## content_type
1515

16-
`changelog`
16+
```yaml
17+
pcx_content_type: changelog
18+
```
19+
20+
For more details, refer to [`pcx_content_type`](/style-guide/frontmatter/custom-properties/#pcx_content_type).
1721

1822
## Ownership
1923

src/content/docs/style-guide/documentation-content-strategy/content-types/concept.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ instructional, descriptive, approachable, supportive
1313

1414
## content_type
1515

16-
`concept`
16+
```yaml
17+
pcx_content_type: concept
18+
```
19+
20+
For more details, refer to [`pcx_content_type`](/style-guide/frontmatter/custom-properties/#pcx_content_type).
1721

1822
## Structure
1923

src/content/docs/style-guide/documentation-content-strategy/content-types/configuration.mdx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ plain, descriptive, straightforward
1414

1515
## content\_type
1616

17-
`configuration`
17+
```yaml
18+
pcx_content_type: configuration
19+
```
20+
21+
For more details, refer to [`pcx_content_type`](/style-guide/frontmatter/custom-properties/#pcx_content_type).
1822

1923
## When to use
2024

@@ -39,46 +43,46 @@ Configurations are useful for parts of the product that are very configuration-i
3943
```
4044

4145
---
42-
weight: xx
46+
weight: xx
4347
pcx_content_type: configuration
4448
---
4549

4650
# Title
47-
51+
4852
Write an overview of the high-level feature here, not more than 2-3 sentences. Outline what users can achieve with it, and if necessary, link to other parts of the docs.
49-
53+
5054
* [Feature 1](/feature-1)
5155
* [Feature 2](/feature-2)
5256
* [Feature 3](/feature-3)
53-
57+
5458
## Feature 1
55-
59+
5660
(Feature 1) allows you to (placeholder). For example, the following configuration (placeholder).
57-
61+
5862
| Setting 1 | Setting 2 | Setting 3 |
59-
60-
| - | - | - |
61-
63+
64+
| - | - | - |
65+
6266
| Value 1 | Value 2 | Value 3 |
63-
67+
6468
## Feature 2
65-
69+
6670
(Feature 2) allows you to (placeholder). For example, the following configuration (placeholder).
67-
71+
6872
| Setting 1 | Setting 2 | Setting 3 |
69-
70-
| - | - | - |
71-
73+
74+
| - | - | - |
75+
7276
| Value 1 | Value 2 | Value 3 |
73-
77+
7478
## Feature 3
75-
79+
7680
(Feature 3) allows you to (placeholder). For example, the following configuration (placeholder).
77-
81+
7882
| Setting 1 | Setting 2 | Setting 3 |
79-
80-
| - | - | - |
81-
83+
84+
| - | - | - |
85+
8286
| Value 1 | Value 2 | Value 3 |
8387
```
8488

0 commit comments

Comments
 (0)