Six simple steps to install the pygment syntax highlighter in a Jekyll blog that uses bootstrap.

Highlighting your code-examples in your blog makes your articles simpler to read. When using Jekyll the “default” option for highlighting code is provided from the pygments plugin.

Your have to do the following steps in Windows machines, if you want to use it in your blog:

1
2
3
{% highlight javascript linenos %}
    // code
{% endhighlight %}

where javascript is the language you want to highlight and linenos is the flag for showing the line numbers together with the code.

1
2
3
  .gutter pre, .code pre {
      border: none;
  }

now your highlighted code looks like this:

Bootstrap pre element after removing border

comments powered by Disqus