You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The partial files used in the docs are located in src/content/partials/
10
+
11
+
## Partial files variables
12
+
13
+
- Some partial files have variables to account for the fact that the partials are reused in different places and even products.
14
+
- Some partials also have JSX fragments. These pieces of code are conditionally rendered in the pages where the specific variable (magic word as it's called sometimes) is present. An example of these conditionally rendered pieces of code is:
15
+
16
+
{ props.magicWord === "hardware" && (
17
+
<>
18
+
<p>You need to purchase <ahref="https://www.cloudflare.com/magic-wan">{props.productOriginalName}</a> before you can purchase and use the {props.productName}. The {props.productName} can function as your primary edge device for your network, or be deployed in-line with existing network gear.</p>
19
+
</>
20
+
)
21
+
}
22
+
23
+
This code would only be rendered if the page has a magicWord variable set to "hardware".
24
+
25
+
## General guidance
26
+
27
+
- Do not make any changes to content without showing me what you want to change and asking if I agree to the changes.
28
+
- Do not use HTML for ordered lists.
29
+
- When you use JSX fragments to conditionally render a block of code, always use the props variable to account for the fact that the partials are reused in different places and even products.
30
+
- When you use JSX fragments to conditionally render a block of code, be aware that you will probably need to use the <Markdown /> component to properly render content that is not a single sentence.
31
+
- Only use the <Markdown /> component in JSX conditionals, and only if needed.
32
+
- Do not duplicate content when creating ternary or binary conditions.
33
+
- When adding a variable to a link, use HTML instead of Markdown.
34
+
- Whenever something is not clear, ask the user for more input.
0 commit comments