2
votes

I expected kramdown with rouge to add spans for colorful highlighting, but it just generates a code block.

<pre>
<code class="language-py">
def say_hello():
    print "Hello world"

say_hello()
</code></pre>

Should I use highlight js to add pretty colors? Shouldn't rouge add the right spans?

My config.yml says:

markdown: kramdown
kramdown:
     input: GFM
     syntax_highlighter: rouge

Jekyll runs fine, grunt runs fine, I tried: gem install kramdown rouge just to be sure. I use backticks for code and run jekyll locally.

```py
def say_hello():
    print "Hello world"

say_hello()
```
1

1 Answers

1
votes

With kramdown, use

~~~language
... code ...
~~~

do get hightlighting (cf the documentation).