JekyllでPygmentsを使ってのシンタックスハイライト
シンタックスハイライトに、Pygmentsを使いたくなったので変更する。
1.pygmentsをインストールする。
pip install pygments2. 以下のコマンドでcssを生成する。
pygmentize -a .highlight -S monokai -f html > css/monokai.css3. Gemfileにpygmentsを追加
gem 'pygments.rb'
4. _config.ymlに、以下の記載を追加する。
highlighter: pygments5. デプロイする。
こんなかんじになりました
def hoge
puts "test"
end参考
Related contents
TECH
2017.01.08
TECH
2014.12.13
TECH
2014.12.02
TECH
2014.12.01
TECH
2014.11.29
TECH
2014.11.25
TECH
2014.10.21
TECH
2014.09.03