Syntax highlighting markdown code blocks in Jekyll (without using liquid tags)

前端 未结 9 1934
灰色年华
灰色年华 2020-12-04 09:19

It seems like syntax highlighting in Jekyll is limited to using liquid tags and pygments like so:

{% highlight bash %}
cd ~
{% endhighlight %}
9条回答
  •  北海茫月
    2020-12-04 09:54

    Step 1. Install Redcarpet.

    gem install redcarpet
    

    Step 2. Update the build settings in your _config.yaml like this.

    # Build settings
    #markdown: kramdown
    markdown: redcarpet
    

提交回复
热议问题