Skip to content

Commit 340db1b

Browse files
Cherryelithrar
authored andcommitted
[Docs Site] format .astro (#16839)
1 parent 7bcd778 commit 340db1b

File tree

9 files changed

+1674
-506
lines changed

9 files changed

+1674
-506
lines changed

src/components/Details.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ const { header, open } = props.parse(Astro.props);
1313
---
1414

1515
<details open={open}>
16-
<summary set:html={marked.parse(header)} />
17-
<slot />
16+
<summary set:html={marked.parse(header)} />
17+
<slot />
1818
</details>

src/components/DirectoryListing.astro

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,21 @@ pages.sort(sortBySidebarOrder);
2727
---
2828

2929
<ul>
30-
{
31-
pages.map((page) => {
32-
const description = descriptions && page.data.description;
33-
const href = page.data.external_link ?? "/" + page.slug + "/";
34-
return (
35-
<li>
36-
<a href={href}>{page.data.title}</a>{description &&
37-
<span>: </span>
38-
<Fragment set:html={marked.parseInline(description)} />
39-
}
40-
</li>
41-
);
42-
})
43-
}
30+
{
31+
pages.map((page) => {
32+
const description = descriptions && page.data.description;
33+
const href = page.data.external_link ?? "/" + page.slug + "/";
34+
return (
35+
<li>
36+
<a href={href}>{page.data.title}</a>
37+
{description && (
38+
<>
39+
<span>: </span>
40+
<Fragment set:html={marked.parseInline(description)} />
41+
</>
42+
)}
43+
</li>
44+
);
45+
})
46+
}
4447
</ul>

src/components/GlossaryDefinition.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ if (prepend) {
2020
general_definition = prepend.concat(general_definition);
2121
}
2222
23-
general_definition = general_definition.charAt(0).toUpperCase() + general_definition.slice(1);
23+
general_definition =
24+
general_definition.charAt(0).toUpperCase() + general_definition.slice(1);
2425
---
2526

2627
<Fragment set:html={marked.parse(general_definition)} />

src/components/HomepageHero.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ if (image) {
4646
<div class="sl-flex copy">
4747
<div class="sl-flex copy links">
4848
<a class="px-2" href="/products/">Products</a>
49-
<a class="px-2" href="/fundamentals/subscriptions-and-billing/">Subscriptions and billing</a>
49+
<a class="px-2" href="/fundamentals/subscriptions-and-billing/"
50+
>Subscriptions and billing</a
51+
>
5052
<a class="px-2" href="/api/">API</a>
5153
<a class="px-2" href="/changelog/">Changelog</a>
5254
<a class="px-2" href="/glossary/">Glossary</a>

src/components/Markdown.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { marked } from "marked";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
text: z.string(),
8+
text: z.string(),
99
});
1010
1111
const { text } = props.parse(Astro.props);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<h2>Response</h2>
22

3-
<p>The response is a binary PNG file.</p>
3+
<p>The response is a binary PNG file.</p>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
import type { Props } from '@astrojs/starlight/props';
3-
import Default from '@astrojs/starlight/components/SkipLink.astro';
2+
import type { Props } from "@astrojs/starlight/props";
3+
import Default from "@astrojs/starlight/components/SkipLink.astro";
44
---
55

66
<!-- Keep the default skip link in place -->
7-
<Default {...Astro.props}><slot /></Default>
7+
<Default {...Astro.props}><slot /></Default>

src/pages/plans.astro

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,22 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
33
import { ProductFeatures } from "~/components";
44
---
55

6-
<StarlightPage frontmatter={{ title: "Plans", template: "splash", description:
7-
"View the products and features available to you based on your Cloudflare plan."}}>
8-
9-
<p>A feature-level companion to our <a href='https://www.cloudflare.com/plans/'>Plans and Pricing page</a></p>
10-
<p style="font-size:.85em;margin-top:-.25em;">(may not include <a href='#missing-features'>all features</a>)</p>
6+
<StarlightPage
7+
frontmatter={{
8+
title: "Plans",
9+
template: "splash",
10+
description:
11+
"View the products and features available to you based on your Cloudflare plan.",
12+
}}
13+
>
14+
<p>
15+
A feature-level companion to our <a href="https://www.cloudflare.com/plans/"
16+
>Plans and Pricing page</a
17+
>
18+
</p>
19+
<p style="font-size:.85em;margin-top:-.25em;">
20+
(may not include <a href="#missing-features">all features</a>)
21+
</p>
1122

1223
<h2 id="account">Account</h2>
1324
<div class="grid grid-cols-2 *:!mt-0">
@@ -96,12 +107,32 @@ import { ProductFeatures } from "~/components";
96107

97108
<h2 id="missing-features">Missing features</h2>
98109

99-
<p>This page is meant to be a companion to our <a href='https://www.cloudflare.com/plans/'>Plans and Pricing page</a>, but is not meant to be comprehensive. In the event of any inconsistency between this page and the Plans and Pricing page, the Plans and Pricing page controls.</p>
100-
<p>Refer to the following locations for more information:</p>
101-
<ul>
102-
<li><strong>Developer products</strong>: Refer to the <a href='https://www.cloudflare.com/plans/developer-platform/'>Developer Platform pricing page</a> or individual <a href='/products/'>product docs</a> to learn more about plans and pricing.</li>
103-
<li><strong>Zero Trust products</strong>: Refer to the <a href='https://www.cloudflare.com/plans/zero-trust-services/'>Zero Trust pricing</a> page.</li>
104-
<li><strong>Other products</strong>: Refer to the individual <a href='/products/'>product docs</a> to learn more about plans and pricing.</li>
105-
</ul>
106-
110+
<p>
111+
This page is meant to be a companion to our <a
112+
href="https://www.cloudflare.com/plans/">Plans and Pricing page</a
113+
>, but is not meant to be comprehensive. In the event of any inconsistency
114+
between this page and the Plans and Pricing page, the Plans and Pricing page
115+
controls.
116+
</p>
117+
<p>Refer to the following locations for more information:</p>
118+
<ul>
119+
<li>
120+
<strong>Developer products</strong>: Refer to the <a
121+
href="https://www.cloudflare.com/plans/developer-platform/"
122+
>Developer Platform pricing page</a
123+
> or individual <a href="/products/">product docs</a> to learn more about plans
124+
and pricing.
125+
</li>
126+
<li>
127+
<strong>Zero Trust products</strong>: Refer to the <a
128+
href="https://www.cloudflare.com/plans/zero-trust-services/"
129+
>Zero Trust pricing</a
130+
> page.
131+
</li>
132+
<li>
133+
<strong>Other products</strong>: Refer to the individual <a
134+
href="/products/">product docs</a
135+
> to learn more about plans and pricing.
136+
</li>
137+
</ul>
107138
</StarlightPage>

0 commit comments

Comments
 (0)