← Back to Changelog

Code Blocks

The code blocks on the documentation site and the blog are powered by [rehype-pretty-code](https://github.com/atomiks/rehype-pretty-code). The syntax highlighting is done using [shiki](https://github.com/shikijs/shiki). It has the following features: 1. Beautiful code blocks with syntax highlighting. 2. Support for VS Code themes. 3. Works with hundreds of languages. 4. Line and word highlighting. 5. Support for line numbers. 6. Show code block titles using meta strings. <Callout> Thanks to Shiki, highlighting is done at build time. No JavaScript is sent to the client for runtime highlighting. </Callout> ## What to expect from here on out What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_. It's important to cover all of these use cases for a few reasons: 1. We want everything to look good out of the box. 2. Really just the first reason, that's the whole point of the plugin. 3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items. Now we're going to try out another header style. ### Typography should be easy So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable. Something a wise person once told me about typography is: > Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad. It's probably important that images look okay here by default as well: