Jekyll + redcarpet line numbers

GGhe

I set up a Jekyll blog and I have the following config for syntax highlighting.

markdown: redcarpet
highlighter: pygments

This allows me to add syntax highlighting like this:

```javascript
function blah(){

}
```

Is there any way to keep this format but add line numbers?

David Jacquel

Out of the box Jekyll code highlight :

{% highlight ruby linenos %}
def foo
  puts 'foo'
end
{% endhighlight %}

And no need to highlight with javascript. Just add pygments css.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related