Jekyll 文档中指出,代码高亮是通过使用 Liquid 标签实现的,具体如下:
{% 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 %}
然而,我更喜欢使用Markdown语法:
```ruby
def foo
puts 'foo'
end
```
我自己尝试了以下方法:
``` ini
; Disables the splash screen, if it has been compiled into the launcher.
RunLocally=true
```
然而,结果并不如预期那样。
markdown: redcarpet
添加到_config.yml
中,现在代码示例使用markdown语法呈现。 - orschiro