Every heading on this page is given an id by satteri-slug
and an anchor link by satteri-autolink-headings.
All the maths is rendered by satteri-katex.
This page is built by Astro 7 with the Sätteri processor. Its HTML is snapshot-tested in CI, so it is proof the plugins work in a real build rather than only in unit tests.
Headings and anchors
Hover any heading and follow the #. Duplicate headings get numbered ids, so the two sections
below do not collide.
Duplicate
The id of this one is duplicate.
Duplicate
The id of this one is duplicate-1.
Punctuation, symbols & casing!
Punctuation is stripped and the text is lowercased, exactly as rehype-slug did.
Maths
Inline maths flows with the text: the Pythagorean identity sits inside this sentence, as does Euler’s .
Display maths gets its own block:
Maths that does not parse
A broken expression does not break the build. This one, \frac{a}, is left in place and flagged rather than throwing.
Built into Sätteri
The features below need no plugin at all — they are Sätteri parser features.
| Feature | Syntax | Enabled by |
|---|---|---|
| Tables | this table | gfm, on by default |
| Strikethrough | gfm, on by default |
|
| Task lists | see below | gfm, on by default |
| Footnotes | like this1 | gfm, on by default |
| Maths parsing | $x$ |
features.math |
- Tables, strikethrough and task lists
- Footnotes
- Anything needing
remark-gfm
Ordinary code is left alone
const { html } = markdownToHtml("## Hello", {
hastPlugins: [satteriSlug(), satteriAutolinkHeadings(), satteriKatex()],
});
Inline code is untouched too — only language-math blocks are rendered as maths.
Footnotes
-
Footnotes are part of GFM, which Sätteri enables by default. ↩