Jekyll Syntax Highlighting Not Working - Classes Are Not Being Added

后端 未结 3 1066
囚心锁ツ
囚心锁ツ 2021-01-14 08:43

I cannot get syntax highlighting to work on my Jekyll-powered blog.

The development files can be found here: https://github.com/StevenXL/stevenxl.github.io.

相关标签:
3条回答
  • 2021-01-14 09:09

    For me this seemed to be a casing issue for my language hints.

    Did not work:

    ``` SQL

    Worked:

    ``` sql

    0 讨论(0)
  • 2021-01-14 09:11

    You must use the Jekyll highlight tag

    {% highlight ruby %}
    def foo
      puts 'foo'
    end
    {% endhighlight %}
    
    0 讨论(0)
  • 2021-01-14 09:23

    I had the same issue using the monokai highlighting css from the jekyll-uno theme.

    To solve the problem I had to update the CSS, using rouge itself is quite straightforward (taken from the docs):

    rougify style monokai > css/monokai.css

    There are other themes available, too.

    0 讨论(0)
提交回复
热议问题