Set Up Pygments on Jeykll in OS X
December 29, 2011

A trivial task on OS X, but after setting up Kramdown and Coderay only to find out that GitHub pages doesn’t support it, this could be useful.

First, simply install Pygments. It’s built in python, so we just use easy_install on OS X and we’re ready to go.

    $ sudo easy_install pygments

We can then use the pygmentize command to generate some code highlighting styles. First, I would recommend previewing the default Pygment styles. Then you output the style to a css file.

    $ pygmentize -S default -f html > pygments.css

Just replace default with the one of the included Pygments styles, include that in your styles, and you’re all set.