Highlight
Highlighting built for the web.
Register the languages your docs use, highlight synchronously, and ship one compact semantic HTML tree that every theme can share.
Selective assembly
The registry is the bundle plan.
The core knows no languages. Direct imports make the site’s language set explicit and let the bundler discard everything else.
Semantic output
Change the palette. Keep the markup.
Tokens carry stable semantic classes instead of theme colors. CSS variables recolor the same tree without a second highlighting pass.
const
</span>
--th-keyword: #a21caf
--th-keyword: #f0abfc
Context-aware scanners
Web languages rarely stay in their lane.
HTML, Vue, Svelte, EJS, Markdown, and JavaScript templates delegate embedded regions only when the nested language is registered.
const score: number = 0.98
</script>
Web
TS · TSX · JS · JSX · CSS · HTML
Content
Markdown · MDX · JSON · YAML
Shell
Bash · Shell · PowerShell
Frameworks
Vue · Svelte · Astro · EJS
Presentation metadata
Annotate the lesson, not the token stream.
Highlight lines, exact character ranges, insertions, deletions, focus, errors, and warnings without changing the source or tokenizer.
Corpus, not toys
Tuned against the docs it will render.
The committed corpus samples 333 fixtures from 2,940 TanStack documentation files. Release checks cover fidelity, deterministic HTML, bundle profiles, and runtime throughput.
Project benchmark report. This measures the tested corpus and output shape, not equivalent grammar accuracy; Shiki targets deeper TextMate fidelity.
Choose by job
A docs highlighter is not an editor highlighter.
Highlight is optimized for known web languages and compact page output, not TextMate completeness, automatic detection, or incremental editor state.
Known docs languages, compact HTML, CSS themes, and annotations matter most.
TextMate and VS Code fidelity, broad language coverage, and editor-grade themes are the job.
The smallest straightforward JavaScript and TypeScript path is enough.
Explicit integrations
Drop it into Markdown without hiding the language set.
Every renderer and adapter receives the highlighter you assembled; none imports every language behind your back.
Natural companion
A serializable document model that keeps highlighting at an explicit boundary.
Explore MarkdownPartners
Sponsors get special perks like private discord channels, priority issue requests, and direct support!