Rehype Code

Code syntax highlighter

A built-in syntax highlighter based on Shiki.

Usage

Add the plugin.

import { rehypeCode } from 'fumadocs-core/mdx-plugins'

const config = {
    rehypePlugins: [
      [rehypeCode, { ... }]
    ],
}

For more information, see Shiki.

Additional Features

  • title meta string
  • Default language
  • Add icon prop to code blocks

Last updated on