Syntax highlighting in jekyll using redcarpet

后端 未结 3 708
滥情空心
滥情空心 2021-01-06 02:45

I\'m trying to get code highlighting to work for a simple blog built with jekyll. I want to be able to do code highlighting within posts written in markdown so I enabled red

相关标签:
3条回答
  • 2021-01-06 03:00

    You need some CSS magic. Use this one or pick one from here.

    0 讨论(0)
  • 2021-01-06 03:00

    You can create the CSS with the highlighter itself

    rougify style > rouge.css
    

    Or

    coderay stylesheet > coderay.css
    
    0 讨论(0)
  • 2021-01-06 03:08

    I like to share the solution as I faced and it took much time to get rid of this issue. Default syntax highlighting is very poor in Jekyll. Like David said, You really need some CSS magic. Check this gist to solve the syntax highlighting problem.

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