Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/components/DocsetGrid/Docset.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ interface Props {
icon?: string;
/** Render a product icon in the neutral text color instead of its brand color. */
neutral?: boolean;
/**
* Heading level for the card title. Grids almost always sit directly under an
* `##`, so `h3` is the default; pass 4 for the handful nested under an `###`.
* Skipping a level breaks the document outline that assistive tech and
* agents read the page structure from.
*/
headingLevel?: 3 | 4;
}

const { title, path, icon, neutral } = Astro.props;
const { title, path, icon, neutral, headingLevel = 3 } = Astro.props;
const Heading = `h${headingLevel}` as 'h3' | 'h4';
const productIconName = parseProductIcon(icon);
const productKey = neutral ? null : (productIconName ?? (path === '/workflow' ? 'workflow' : null));
---

<a href={path} class="container" data-product={productKey}>
<h4>
<Heading>
{productIconName && (
<div class="docset-icon" data-product={productKey}>
<ProductIcon name={productIconName} />
Expand All @@ -29,7 +37,7 @@ const productKey = neutral ? null : (productIconName ?? (path === '/workflow' ?
</div>
)}
<span>{title}</span>
</h4>
</Heading>
<div class="description">
<slot />
</div>
Expand Down Expand Up @@ -69,6 +77,7 @@ const productKey = neutral ? null : (productIconName ?? (path === '/workflow' ?
border-color: var(--color-rose-700);
}

h3,
h4 {
display: flex;
align-items: center;
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/ci-insights.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ GitHub and covers basic configuration steps.

<DocsetGrid>
<Docset
headingLevel={4}
title="Self-hosted runners"
path="/ci-insights/runners"
icon="lucide:server"
>
Monitor your self-hosted runners' capacity, performance, cost, and reliability.
</Docset>
<Docset
headingLevel={4}
title="Jobs"
path="/ci-insights/jobs"
icon="lucide:list-checks"
>
Monitor job health, duration, cost, and flaky behavior.
</Docset>
<Docset
headingLevel={4}
title="Auto-Retry"
path="/ci-insights/auto-retry"
icon="lucide:rotate-cw"
Expand Down
Loading