diff --git a/docs/contributing/pages/components.mdx b/docs/contributing/pages/components.mdx
index be654928387af..389967d259708 100644
--- a/docs/contributing/pages/components.mdx
+++ b/docs/contributing/pages/components.mdx
@@ -41,9 +41,7 @@ See also the [Note component](#note).
Render an expandable section.
-
-This is some content
-
+This is some content
```markdown {tabTitle:Example}
@@ -110,6 +108,7 @@ You can also highlight diffs using the `diff` language:
+ plus one
```
````
+
If you want to preserve syntax highlighting, you can add `diff` metadata to any code block
then annotate the diff with `+` and `-`:
@@ -193,6 +192,7 @@ Attributes:
- `header` (string) - optional header value to include, rendered as an H2
- `nextPages` (boolean) - only render pages which come next based on sidebar ordering
+- `exclude` (string[]) - an array of pages to exclude from the grid. Specify the file name of the page, for example, `"index"` for `index.mdx`.
## PlatformContent
@@ -281,15 +281,11 @@ You can specify multiple features by separating them with a comma:
The range visibility will be controlled by the `OnboardingOptionButtons` component:
-````jsx diff
+```jsx diff
-````
+```
- `options` can either be either an object of this shape:
@@ -300,10 +296,12 @@ The range visibility will be controlled by the `OnboardingOptionButtons` compone
checked: boolean
}
```
+
or a string (one of these `id`s 👆) for convenience when using defaults.
- The underlying implementation relies on the `onboardingOptions` metadata in the code blocks to be valid JSON syntax.
+ The underlying implementation relies on the `onboardingOptions` metadata in
+ the code blocks to be valid JSON syntax.
- default values: `checked: false` and `disabled: false` (`true` for `error-monitoring`).
@@ -311,11 +309,7 @@ or a string (one of these `id`s 👆) for convenience when using defaults.
Example (output of the above):
@@ -367,29 +361,32 @@ Or you can use the `hideForThisOption` prop to hide the content for the selected
Hide this section for `profiling` option.
```
-``````
+````
Example:
+
- toggle the `performance` option above to see the effect:
- ```jsx
-
- This code block is wrapped in a `OnboardingOption` component and will only
- be rendered when the `performance` option is selected.
-
- ```
+ ```jsx
+
+ This code block is wrapped in a `OnboardingOption` component and will only
+ be rendered when the `performance` option is selected.
+
+ ```
+
- toggle the `profiling` option above to see the effect:
- ```jsx
-
- This code block is wrapped in a `OnboardingOption` component and will only
- be rendered when the `profiling` option is NOT selected.
-
- ```
+ ```jsx
+
+ This code block is wrapped in a `OnboardingOption` component and will only
+ be rendered when the `profiling` option is NOT selected.
+
+ ```
+
diff --git a/src/components/pageGrid.tsx b/src/components/pageGrid.tsx
index 336e3209ab12d..1b1355dfe168d 100644
--- a/src/components/pageGrid.tsx
+++ b/src/components/pageGrid.tsx
@@ -13,7 +13,7 @@ type Props = {
header?: string;
};
-export function PageGrid({header}: Props) {
+export function PageGrid({header, exclude}: Props) {
const {rootNode, path} = serverContext();
const parentNode = nodeForPath(rootNode, path);
@@ -27,7 +27,7 @@ export function PageGrid({header}: Props) {
{parentNode.children
/* NOTE: temp fix while we figure out the reason why some nodes have empty front matter */
- .filter(c => c.frontmatter.title)
+ .filter(c => c.frontmatter.title && !exclude?.includes(c.slug))
.sort((a, b) => sidebarOrderSorter(a.frontmatter, b.frontmatter))
.map(n => (
-