Disable the Rouge - Jekyll's default syntax highlighter
![thumb](https://mycyberuniverse.com/images/thumbnail/jekyll-rouge.png)
By default Jekyll version 3, ships with Rouge syntax highlighter. For some reason, you may want to disable it. For example, if you replace the built-in Rouge to another syntax highlighter such as Prism.js or your own custom highlighter.
To get Rouge disabled in Jekyll 3, just do the following.
-
Open the
_config.yml
file located at the root directory of your Jekyll-based website. -
Add the following line:
highlighter: none
Now you have Rouge syntax highlighter disabled.
But this is not working with Jekyll-based websites that hosted on GitHub Pages. In this case, we need some trick with syntax_highlighter_opts
. Instead of highlighter: none
add the following lines:
markdown: kramdown
kramdown:
syntax_highlighter_opts:
disable : true
This will disable the syntax highlighting on GitHub Pages too.
If this article has helped you then please leave a comment
Thanks for reading!
Arthur is a designer and full stack software engineer. He is the founder of Space X-Chimp and the blog My Cyber Universe. His personal website can be found at arthurgareginyan.com.