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

TECH
2017.01.08
静的サイトジェネレータ「Hugo」でシンプルブログサイトを構築する

TECH
2014.12.13
Jekyllのタグとカテゴリを整理するために、一覧表示するWebアプリ(個人用)をつくった

TECH
2014.12.02
Jekyllに月別アーカイブを実装する

TECH
2014.12.01
Jekyllにタグクラウドを実装する

TECH
2014.11.29
UTF-8-MACとは何か?〜Jekyllのカテゴリ(タグ)ページで濁点を含むページが表示されない〜

TECH
2014.11.25
Macのsedで改行コードを出力させる 〜改行コードの違い再確認〜

TECH
2014.10.21
Jekyllでページ分割する -pagenation-

TECH
2014.09.03
YouTube埋め込みタグをレスポンシブ化する