Skip to content

Configuration

This page will tell you which configuration options are available for the rehype plugin and marked extension.

When true, code blocks without the editor property are ignored, but you can still create code blocks by adding the editor=false meta property. This is useful if you’re using another plugin to highlight code blocks.

Default properties for fenced code blocks with the editor meta property. Useful to avoid repeating the same meta properties on every code block.

Default properties for fenced code blocks without the editor meta property, or with editor=false. Useful to avoid repeating the same meta properties on every code block.

Method that allows you to wrap the default render function or completely override it. This method gets called with the following arguments:

  • props: CodeBlockProps: Props used to render the editor or code block.
  • defaultRenderer: (props: CodeBlockProps) => string: The default render function.
  • isEditor: boolean: Whether or not an editor is being rendered.

The features page shows an example.

Options for highlighting inline code between backticks. If this option is omitted, inline highlighting will be disabled. The features page explains this feature in more detail.

These plugins will warn you when a code block has a language without a registered grammar. Set this option to true to disable the warnings.