Rehype plugins for code
If you want to use rehype plugin with Astro for processing code blocks (aka code fences), like this in Markodwn:
Or like this in HTML:
You may need to use special configuration, because Astro (and Starlight) comes with built-in code highlighter.
Astro
To use with Astro, you need to disable built-in syntax highlighting and put it after your plugin:
Starlight
Important use Starlight v0.22+ ↗