Jekyll on Windows: Pygments not working

前端 未结 10 1317
失恋的感觉
失恋的感觉 2020-12-23 20:06

I updated to the latest JekyllBuild (1.0.3) before I always used the RC. After updating the parsing of codes (with Pygments) doesn\'t work anymore. I always get the followin

10条回答
  •  庸人自扰
    2020-12-23 20:39

    I know this is answered but sharing my experience. So it appears that the issue lies with pygments.rb of ruby installation. After installing jekyll and trying to run at localhost it would give an error at the default post file. By deleting the syntax highlighting code from the markdown file (see below) and removing the reference of pygments from _config.yml file, I was able to run it on the localhost.

    {% highlight ruby %}
    def print_hi(name) puts "Hi, #{name}" end print_hi('Tom') prints 'Hi, Tom' to STDOUT. {% endhighlight %}

    Remove the striked-out lines

    The changes worked however am yet to figure out if there is a possible way to use the pygments.rb for code highlighting.

提交回复
热议问题