Ronalds Vilciņš

How to disable Rouge syntax highlighting in Jekyll

Jekyll uses Rouge for syntax highlighting by default. If you want plain code blocks, or plan to handle highlighting another way, you can turn it off in _config.yml.

For a normal Jekyll site, add:

YAML
highlighter: none

GitHub Pages uses Jekyll with Kramdown, so use Kramdown’s syntax-highlighter option there:

YAML
markdown: kramdown
kramdown:
  syntax_highlighter_opts:
    disable: true

Restart the local Jekyll server after changing _config.yml; configuration changes are not always picked up while the server is running. Your fenced code blocks will remain in the page, but Rouge will no longer add syntax-highlighted markup.

Filed under on

Last updated on

← Back to all articles