Components
A cheat-sheet of every component available when writing posts on this site — the
Docusaurus/MDX built-ins and the custom components in src/components/. Each
author-facing component is shown rendered live with its source underneath, so
you can see what it looks like and copy the exact syntax. Internal theme components
(cookie banner, share row, …) are listed at the bottom for completeness.
Admonitions
Callout boxes. Built into Docusaurus — no import. Keywords: note, tip, info,
warning, danger. An optional title follows the keyword. They render as the post page
kit's Callout: a neutral surface with a coloured rail, and "Side note — safe to skip" on
note and info (P15).
:::tip
A handy shortcut.
:::
:::info[Going deeper]
Extra context for the curious.
:::
Code fences with a title
A fenced code block. Add title="…" for a filename header + copy button. The language
after the opening backticks enables syntax highlighting.
const greeting: string = "hello";
console.log(greeting);
```ts title="example.ts"
const greeting: string = "hello";
console.log(greeting);
```
Collapsible <details>
Native HTML — a click-to-expand block. Leave a blank line after </summary> so the
Markdown inside is parsed.
Click to expand
Hidden content — supports Markdown, lists, and code.
- one
- two
<details>
<summary>Click to expand</summary>
Hidden content — supports **Markdown**, lists, and code.
- one
- two
</details>
Mermaid diagrams
Fenced ```mermaid blocks render as diagrams (enabled site-wide via
@docusaurus/theme-mermaid). Each one renders in the post page kit's DiagramFrame: a title
bar, zoom and a full-screen viewer (a thumbnail with "Open diagram" on phones). Add
accTitle: and accDescr: to give it a title and a text version.
```mermaid
flowchart LR
Author[Author] --> MDX[MDX post]
MDX --> Page[Rendered page]
```
Highlight <u>
The house convention for marking the single key sentence of a section. Authored <u>
(and <mark>) draws an indigo highlighter marker, not an underline: the post page
kit's Highlight recipe, applied by a global rule in custom.css. Use sparingly.
<u>This is the one sentence a reader should remember.</u>
Tables
Write normal Markdown tables. Every table renders in the post page kit's DataTable frame:
sticky header, edge fades and keyboard scrolling when it's wider than the page, and on
phones a table with 3+ columns turns each row into a card of labelled fields — no import,
nothing to call.
| Component | Kind | Import? |
|---|---|---|
| ImagePlaceholder | custom | no |
| Admonition | built-in | no |
| Component | Kind | Import? |
| --- | --- | --- |
| ImagePlaceholder | custom | no |
| Admonition | built-in | no |
ImagePlaceholder
Custom, globally registered (no component import — just import the image asset). A lazy-loaded image with a blur-up 🏞️ placeholder until it loads. The main way to add images to a post.
import cover from './images/cover.webp';
<ImagePlaceholder src={cover} alt="A short description of the image" />
Youtube
Custom, globally registered. A responsive, lazy-loaded YouTube embed. Pass the embed
URL (/embed/<id>), ideally the youtube-nocookie.com variant.
<Youtube src="https://www.youtube-nocookie.com/embed/VIDEO_ID" />
Button
Custom — a styled link. Requires an explicit import (it's not globally registered).
Read the blogimport Button from "@site/src/components/Button";
<Button to="/blog" variant="primary">Read the blog</Button>
PodcastPlayer
Custom, globally registered. The audio card for the spoken version of a post: it renders
the post page kit's AudioPlayer (play, seek, speed). Import the audio asset and pass it
as src. (Shown as source only here — a live demo would need an audio file.)
import podcast from './audio/podcast.mp3';
<PodcastPlayer src={podcast} title="Listen to the podcast version" />
Post page kit
The components of the redesigned post page, each in its own folder with a CSS Module
(ADR 0007).
Every blog post renders with them (opt out with kit: false); see each one live on the
Post page kit page.
| Component | Tag | What it is |
|---|---|---|
ReadingProgress | 02 | Reading progress hairline |
ReadingBar | 01 | Slim bar with title, section and time left |
RelatedPosts | 03 | Related, latest and folded years |
PostEyebrow | 04 | Blog / date · reading time |
PostTitle | 05 | Balanced h1 |
Byline | 06 | Author avatar, name, role |
WhatsInside | 07 | Chips with the size of a long post |
ShareButtons | 08 | Share and copy link; native sheet on phones |
PostCover | 09 | Hero image |
LeadParagraph | 10 | Opening paragraph with drop cap |
Highlight | 11 | Indigo highlighter mark |
Gist | 12 | The gist block |
TableOfContents | 13 | Grouped "On this page" |
SectionHeading | 14 | h2 with copy-link chip |
SubHeading | 15 | h3 with indigo marker |
Prose | 16 | Body text wrapper |
InlineCode | 17 | Code word in text |
StepList | 18 | Numbered step cards |
DataTable | 19 | Framed table; cards on phones |
RatingPill | 20 | Tinted rating pill and legend |
DiagramFrame | 21 | Diagram card with zoom and full screen |
CodeFrame | 22 | Code block header with Wrap and Copy |
Definition | 23 | Term and definition card |
Callout | 24 | Side note with a coloured rail |
Disclosure | 25 | Collapsible block |
AudioPlayer | 26 | Audio version player |
Glossary | 27 | Filterable glossary grid |
GlossaryTerm | 27b | Term with a popover |
References | 28 | Numbered sources |
TagList | 29 | Filed-under tags |
EditLink | 30 | Suggest an edit on GitHub |
PostNav | 31 | Newer / older post cards |
CommentsFrame | 32 | Comments card with consent gate |
SiteFooter | 33 | Footer columns; accordion on phones |
BackToTop | 34 | Back to top button |
ContentsDock | 35 | Phone contents dock and sheet |
PullQuote | 36 | Pull quote |
UpNext | 37 | The post to read next, shown near the end |
Internal components
Not authored inside posts — they're wired into the theme. Listed here so the catalogue is complete (and so the enforcement hook passes).
| Component | Purpose | Where it's rendered |
|---|---|---|
Comments | Comments block (currently a no-op stub) | <Comments />, available but inactive |
ConsentBanner | Cookie-consent opt-in banner | Injected site-wide via theme/Root.js |
ManageConsent | Withdraw/revisit consent control | The /privacy page |
ResourceDirectory | Filterable card directory of the data.json links, grouped by groups.js | The /resources index, generated by the resources plugin |