Add syntax highlighting to gh-pages

前端 未结 5 1749
遥遥无期
遥遥无期 2020-12-14 01:07

Is there an easy way to add syntax highlighting to my various plugin\'s gh-pages using github\'s Pygments?

I know that every page runs through the Jekyll engine and

5条回答
  •  再見小時候
    2020-12-14 02:04

    Pages already does pygments, there's nothing to install. Just use it!

    ---
    layout: default
    title: Something with codes
    ---
    
    Happy fun highlighting. 
    [More details](https://github.com/mojombo/jekyll/wiki/liquid-extensions)
    
    {% highlight ruby %}
    def foo
      puts 'foo'
    end
    {% endhighlight %}
    

提交回复
热议问题