rehype-pretty-code
is a Rehype plugin powered by the
shiki
syntax highlighter that provides beautiful code blocks for Markdown or MDX. It works on both the server at build-time (avoiding runtime syntax highlighting) and on the client for dynamic highlighting.
Editor-Grade Highlighting
Enjoy the accuracy and granularity of VS Code's syntax highlighting engine and the popularity of its themes ecosystem — use any VS Code theme you want!
Line Numbers and Line Highlighting
Draw attention to a particular line of code.
Word Highlighting
Draw attention to a particular word or series of characters.
ANSI Highlighting
Inline ANSI: > Local: http://localhost:3000/
Kitchen Sink Meta Strings
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
Autolink literals
www.example.com, https://example.com, and contact@example.com.
Footnote
A note1
Strikethrough
one or two tildes.
Table
a | b | c | d |
---|
Tasklist
- to do
- done
Footnotes
-
Big note. ↩