search

Home  >  Q&A  >  body text

github - 如何让Jekyll支持Markdown的代码块格式

Jekyll写博文时,默认的代码块格式为:

{% highlight javascript %}
var a = 1;
var b = 2;
var c = a + b;
{% endhighlight %}

怎样配置才能让它支持Markdown的代码块格式,即:

"ruby
var a = 1;
var b = 2;
var c = a + b;
"

怪我咯怪我咯2760 days ago742

reply all(3)I'll reply

  • 阿神

    阿神2017-04-24 09:14:56

    Configure in _config.yml

    markdown: kramdown
    
    kramdown:
      input: GFM

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 09:14:56

    As far as I know, markdown is supported by default
    It can be configured in _config.xml markdown: kramdown ,markdown 的解析器,有kramdown,rdiscount,redcarpet etc.

    reply
    0
  • 阿神

    阿神2017-04-24 09:14:56

    You put three backticks on one line

    reply
    0
  • Cancelreply