unified

Project: retronav/rehype-shiki

Package: @retronav/rehype-shiki@1.0.1

  1. Dependents: 0
  2. Rehype plugin to highlight your code blocks with Shiki
  1. rehype 88
  2. rehype-plugin 59
  3. highlight 7
  4. shiki 2

@retronav/rehype-shiki

Rehype plugin to highlight your code blocks with Shiki.

Features

Usage

Check index.test.ts for various use cases. This plugin uses the class attribute on the code element to determine the language of the codeblock. Example of a codeblock which is parsed by remark-rehype from markdown and works with this plugin:

<pre>
    <code class="language-typescript">
    const foo = 'bar';
    </code>
</pre>

Inspiration

Much of the plugin's interface is inspired by @leafac/rehype-shiki.