Authoring
How an entry is written here, and a page for every element and component the document surface renders.
Notes about the archive itself: what an entry document may contain, and what each element looks like once rendered.
Every page in this domain is both reference and test. The prose says when to reach for something and what it costs; the examples below the prose are live, so a regression in the renderer shows up here first. If a page here looks wrong, the renderer is wrong rather than the note.
How this is organised
- markdown, the plain Markdown elements: typography, lists, tables, links.
- code, code panels, highlighting, terminals and diffs.
- components, the JSX tags an entry can use without importing anything.
- assets, images and source files that live beside the document.
The shape of an entry
An entry is a directory under content/ holding a README.mdx and whatever
files that document refers to. Nothing registers it: the directory path is the
route, and the loader derives the title, description, headings and assets from
the document when frontmatter leaves them out.
- README.mdxthe entry document
- use-debounce.tsserved as-is
- debounce-diagram.svg
Frontmatter is optional and stays small. The authoring guide in the repository
documents every field; the short version is that title and description are
worth writing by hand and the rest is usually better derived.
Everything in this category
markdown/
- TypographyHeadings and their anchors, inline formatting, blockquotes and rules, as the document surface renders them.
- ListsBulleted, numbered, nested and task lists, including how a list holding code behaves.
- TablesGFM tables, column alignment, and what happens to a wide table on a narrow screen.
- LinksInternal routes, heading anchors, adjacent files and external destinations, and which of them the build checks.
code/
- Line and token highlightingDrawing attention to the lines or words that matter inside a block, with ranges and quoted tokens.
- Code panelsWhat every fenced block becomes, which is a titled panel with a file icon, line numbers, soft wrap, copy and collapse.
- Terminals and diffsShell blocks that read as a session, and diff blocks whose header reports the shape of the change.
- CodeBlock componentThe JSX form of a code panel, for the cases where a fence cannot carry the props.
components/
- CalloutsSemantic notices for a caveat, a tip or a danger, with the five types and when each is honest.
- StepsA numbered procedure whose rail survives the code blocks inside it.
- TabsOne panel per alternative, with keyboard navigation and a shared choice across the document.
- DetailsA native disclosure for the paragraph most readers do not need, and the rule for what may go inside one.
- File treeA directory listing with selectable names and real file icons, instead of ASCII art in a code fence.
- Props tableA reference for a component's props or a function's options, built as a definition list rather than a grid.
- Link cardsA cross-reference that deserves a larger target than an inline link, in a grid of one or two columns.
- Keyboard keysKeys printed as keys, in either the HTML or the component form.
- Type matrixWhat a type accepts and what it turns away, as a table of candidate values against the types under test.