Every component available for technical posts on this site, along with the limits I have actually run into1. Everything below is really rendered rather than screenshotted — diagrams enlarge from the button in their corner, code copies, and all of the text selects. I come back to this page when writing.
Mathematics Link to heading
Rendered at build time with KaTeX. No JavaScript is needed in the browser,
and no math = true in front matter.
Inline maths uses \( \): the birthday bound puts a collision at roughly
queries, which is why SHA-256 offers collision
resistance rather than .
Block maths uses $$ $$:
Aligned equations:
Matrices and large operators:
Why inline maths does not use
$ $With single dollars enabled, “the rig costs $50000 to $60000” has$50000 to $swallowed as an inline formula. Prices are common in technical writing, so inline maths always uses the parenthesis form.
Diagrams Link to heading
The primary tool is D2 (MPL-2.0). Unlike Mermaid it produces SVG at build time, so readers download no JavaScript and there is no CDN dependency. Dark mode is baked into the SVG and follows the site theme toggle.
Flowchart Link to heading
Sequence diagram Link to heading
Class diagram Link to heading
ER diagram Link to heading
State machine Link to heading
D2 has no dedicated state-machine syntax; a plain directed graph does the job.
Nested containers and network layout Link to heading
layout="elk" switches engines; it lays deep hierarchies out more tidily.
Grid layout Link to heading
Shape library Link to heading
Styling and emphasis Link to heading
Edge styles Link to heading
Markdown inside shapes Link to heading
Order of checks
- Verify source IP
- Compare signature
- Check timestamp
Sketch mode Link to heading
Mermaid (fallback) Link to heading
Mermaid covers the types D2 lacks. Its 2.5 MB bundle only loads on pages that actually use it.
gantt
dateFormat YYYY-MM-DD
axisFormat %m/%d
title Research schedule
section Preparation
Literature review :done, a1, 2026-09-01, 30d
Environment setup :active, a2, 2026-09-20, 20d
section Implementation
Prototype : a3, after a2, 45d
Experiments : a4, after a3, 30d
What D2 cannot do Link to heading
Limits I have actually hit, recorded so I do not retry them:
| Item | Status | Workaround |
|---|---|---|
| Gantt chart | No such syntax; the keyword is parsed as a node name | Use Mermaid |
| Pie / bar chart | Same | Use Mermaid, or a table |
| Mindmap | Same | Approximate with a tree |
| LaTeX block | Panics, failing the build | Put maths outside the diagram |
| Code block inside a shape | Text overflows its shape by 13-24px | Use a Markdown block instead |
| Remote icon URL | The URL is written into the SVG, so readers fetch it | Use a local file |
Code Link to heading
Plain block Link to heading
import hashlib, hmac
def verify(secret: bytes, payload: bytes, signature: str) -> bool:
"""Constant-time comparison, so timing cannot leak the signature."""
expected = hmac.new(secret, payload, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)
Line numbers and highlighted lines Link to heading
Append {linenos=true, hl_lines=[3-4]} to the fence:
| |
Very long lines Link to heading
Only the code block scrolls sideways; the page itself never overflows:
openstack server create --flavor m1.large --image ubuntu-24.04 --network lab-net --security-group default --key-name gamma4-lab-key --availability-zone nova my-instance
Inline code Link to heading
Configured under [markup.highlight] in config.toml; noClasses must be
false so the palette comes from the theme _syntax.scss. The monospace face
is a self-hosted JetBrains Mono.
Everything else Link to heading
| Component | Syntax | Rendered |
|---|---|---|
| Maths | parentheses / double dollars | at build time |
| D2 diagram | d2 shortcode | at build time |
| Mermaid | mermaid shortcode | in the browser |
| Code | fenced block | at build time |
Block quotes:
What goes unobserved disappears quietly.
Footnotes collect at the end. The reference is deliberately near the top of the page — with the two close together the view barely moves and you cannot tell whether the jump happened. The target flashes briefly on arrival, and so does the reference when you jump back. ↩︎