In Jekyll, when I set the Markdown converter to kramdown and bundle exec jekyll serve
, this fenced code block
```javascript
function hey(name) {
return 'Hey ' + name;
}
console.log(hey('Brienna'));
```
renders like this:
This happens no matter what I do. I've tried setting the input: GFM
option, but it doesn't make a difference whether or not it's included.
However, when I set the Markdown converter to Redcarpet, the same code block renders like this:
This is what I want to see! But I don't want to use Redcarpet. I want to use kramdown.
As you can see from the rendered HTML below, the code block gets highlighted. I'm using a CSS stylesheet for Pygments, which Rouge is supposed to be able to work with. I noticed that the div
's class changed between Markdown converters. With kramdown, its class is .highlighter-rouge
, whereas with Redcarpet, its class is just highlight
. Do I need to manually modify the CSS if switching between Markdown converters?
Kramdown:
Redcarpet: