Jekyll: highlighting code fragments using markup syntax

Jekyll docs claim code extraction is done using Liquid tags as follows:

{% highlight ruby %}
def show
  @widget = Widget(params[:id])
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @widget }
  end
end
{% endhighlight %}

However, I would prefer to use Markdown syntax:

```ruby
def foo
  puts 'foo'
end
```

I tried this myself as follows:

``` ini
; Disables the splash screen, if it has been compiled into the launcher.
RunLocally=true
```

However, the result does not look as it should.

enter image description here

+4
source share
1 answer

I had to add the following to my _config.yml to make GitHub Pages syntax highlighting work:

markdown: redcarpet
extensions: [fenced_code_blocks]

I don't know why fenced_code_blocksit is required for GitHub pages, as it should be included by default in Jekyll.

+10
source

All Articles