yesodweb/yesodweb.com — pull request #3 by yogsototh (2012-03-12 22:16:17+00:00)
Title: Syntax highlight

I just added automatic syntax highlighting for code using Pandoc.

It adds another dependency, but it makes code immediately nicer to read.
Though, you have to manually describe the language in the source. For now, I just added this modification for the blog.

In the content you should replace:

Some Haskell Code...

by

Some Haskell Code...

And it works flawlessly.

As I said previously, I saw some manually (I believe) added syntax highlight in the book, therefore I added this feature only for the blog.

I didn't searched more, but I wanted to generate automatically the CSS (this can be done by calling styleToCss pygments :: Style -> String). But, I finally copy/pasted the CSS manually.

Tell me if you are interested. It shouldn't be to hard to search and replace in content (perl -pi -e 's#

#

#g' **/* should work fine if you are certain there is only haskell code).

Yann.