Reliable
Idempotent deploys, self-healing services, and boring alerts.
This page is the cheat sheet. Every feature below works in .md and .mdx unless noted.
Bold, italic, both, inline code, strikethrough, and a link.
Blockquotes are supported and render with a left border and muted text.
They can span multiple paragraphs.
Task list:
Definition list (via HTML, works in .md too):
Aside is Starlight’s callout component. Four variants + optional title.
Markdown fallback (works in plain .md):
:::note[Optional title]Note body.:::
:::tipTip body.:::
:::cautionCaution body.:::
:::dangerDanger body.:::Use badges inline in headings, table cells, or as sidebar.badge in frontmatter.
Reliable
Idempotent deploys, self-healing services, and boring alerts.
Reproducible
Everything from a git repo — infra, config, and runbooks.
Observable
Structured logs, RED metrics, and traceable request paths.
Secure
Least privilege by default, secrets pulled at runtime.
npm install @astrojs/starlightpnpm add @astrojs/starlightyarn add @astrojs/starlightTabs can be synchronized across the page by giving them the same syncKey:
pnpm dev npm run dev pnpm build npm run build First step — Starlight numbers these automatically.
Second step — with code inside:
git initThird step — with a nested aside:
Starlight ships hundreds of icons — the same set as astro-icon:
export async function retry<T>(fn: () => Promise<T>, tries = 3): Promise<T> { let lastErr: unknown; for (let i = 0; i < tries; i++) { try { return await fn(); } catch (err) { lastErr = err; await new Promise(r => setTimeout(r, 2 ** i * 100)); } } throw lastErr;}apiVersion: apps/v1kind: Deploymentspec: replicas: 1 replicas: 3 strategy: { type: Recreate } strategy: type: RollingUpdatekubectl apply -f k8s/kubectl -n prod rollout status deploy/api --timeout=2mresource "azurerm_kubernetes_cluster" "aks" { name = var.name location = var.location resource_group_name = var.resource_group_name dns_prefix = var.name}export function createServer() { const app = express();
// boilerplate you rarely care about app.use(cors()); app.use(json()); app.use(cookieParser()); app.use((req, _, next) => { req.id = crypto.randomUUID(); next(); }); app.use(pinoHttp(logger)); app.use(rateLimiter);
app.get('/', (_, res) => res.send('ok')); return app;}Fenced ```mermaid blocks render server-side to SVG (zero client JS).
flowchart LR Dev[Developer] -->|git push| GH[(GitHub)] GH --> CI[GitHub Actions] CI --> Reg[(Container Registry)] CI --> Argo[Argo CD] Argo -->|sync| K8s[Kubernetes cluster]
Sequence:
sequenceDiagram participant U as User participant API as API participant DB as Postgres U->>API: POST /orders API->>DB: INSERT ... DB-->>API: ok API-->>U: 201 Created
Standard GFM tables, sortable in your head:
| Feature | Astro | Starlight | Notes |
|---|---|---|---|
| Images | ✅ | ✅ | via astro:assets |
| MDX | ✅ | ✅ | Components inside markdown |
| Search | ➖ | ✅ | Pagefind built-in |
| i18n | ✅ | ✅ | Locale-aware sidebar |
Native HTML <details> works in markdown:
You can hide long code, appendices, or Q&A behind a summary. Perfect for optional context.
echo "surprise"Math via KaTeX requires an integration — this site ships with the standard Starlight setup, so prefer inline code for formulas that don’t need typesetting:
p99 <= 250msSLO = 99.9% → 43m 12s/monthL = λ · WFor teams that need full math typesetting, add remark-math + rehype-katex and use $…$ / $$…$$.