Skip to content

Commit c8a572c

Browse files
authored
[Chore] Add more descriptions to various frontmatter fields in our style guide and schema (#24489)
* [Chore] Add more descriptions to various frontmatter fields in our style guide and schema * prettier
1 parent c53512f commit c8a572c

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

src/components/ProductReleaseNotes.astro

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ if (!releaseNotes) {
9494
<AnchorHeading depth={2} title={page.data.title} />
9595
</a>
9696
<p class="text-xs">{entry.date}</p>
97-
{page.data.release_notes_product_area_name && (
98-
<h3 class="mt-4!">
99-
<a href={entry.productLink}>{entry.product}</a>
100-
</h3>
101-
)}
10297
{<Fragment set:html={description} />}
10398
</div>
10499
);
@@ -108,11 +103,6 @@ if (!releaseNotes) {
108103
<>
109104
<AnchorHeading depth={2} title={date} />
110105
<div data-product={entry.product.toLowerCase()}>
111-
{page.data.release_notes_product_area_name && (
112-
<h3 class="mt-4!">
113-
<a href={entry.productLink}>{entry.product}</a>
114-
</h3>
115-
)}
116106
{entry.title && <strong>{entry.title}</strong>}
117107
{<Fragment set:html={description} />}
118108
</div>

src/schemas/base.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,24 @@ export const baseSchema = ({ image }: SchemaContext) =>
8181
"This is used to automatically add the [LastReviewed component](/style-guide/components/last-reviewed/).",
8282
),
8383
spotlight: spotlightAuthorDetails,
84-
release_notes_file_name: z.string().array().optional(),
85-
release_notes_product_area_name: z.string().optional(),
84+
release_notes_file_name: z
85+
.string()
86+
.array()
87+
.optional()
88+
.describe(
89+
"Required for the [`ProductReleaseNotes`](/style-guide/components/usage/#productreleasenotes) component.",
90+
),
8691
products: z
8792
.string()
8893
.array()
8994
.optional()
9095
.describe(
9196
"The names of related products, which show on some grids for Examples, [Tutorials](/style-guide/documentation-content-strategy/content-types/tutorial/), and [Reference Architectures](/style-guide/documentation-content-strategy/content-types/reference-architecture/)",
9297
),
93-
summary: z.string().optional(),
98+
summary: z
99+
.string()
100+
.optional()
101+
.describe("Renders a summary description directly below the page title."),
94102
goal: z.string().array().optional(),
95103
operation: z.string().array().optional(),
96104
noindex: z
@@ -117,7 +125,9 @@ export const baseSchema = ({ image }: SchemaContext) =>
117125
component: z.string(),
118126
})
119127
.optional()
120-
.describe("Used by overrides for style guide component documentation"),
128+
.describe(
129+
"Used by overrides for style guide component documentation, which helps us display the [usage counts](/style-guide/components/usage/) for components directly on the component page itself.",
130+
),
121131
banner: z
122132
.object({
123133
content: z.string(),
@@ -129,7 +139,10 @@ export const baseSchema = ({ image }: SchemaContext) =>
129139
.object({ id: z.string(), days: z.number().optional().default(7) })
130140
.optional(),
131141
})
132-
.optional(),
142+
.optional()
143+
.describe(
144+
"Displays a [Banner](https://developers.cloudflare.com/style-guide/frontmatter/banner/) on the current docs page.",
145+
),
133146
icon: SidebarIconSchema(),
134147
feedback: z
135148
.boolean()

0 commit comments

Comments
 (0)