0

I am using Github's API to convert some Github Flavored Markdown into HTML. The HTML I get back has a bunch of classes that can be used for styling different code blocks (HTML, JavaScript, PHP, a bunch of languages). After doing some research, I think Pygments is what I need to get the proper styling so that my code blocks can have syntax highlighting, but I am having trouble finding those stylesheets. Anyone know how to use Pygments to get syntax styling for HTML, PHP, and JavaScript? Thanks!

Animal Rights
  • 9,107
  • 6
  • 28
  • 40
  • Whilst [this question](http://stackoverflow.com/q/9807604/623518) concerns reStructuredText, [my answer](http://stackoverflow.com/a/9809597/623518) is relevant here. Basically if you install Pygments you can then run `pygmentize -S default -f html -a .highlight > style.css` to get their style sheet. – Chris Aug 09 '13 at 07:26
  • ah ok, so there aren't any stylesheets just readily available? – Animal Rights Aug 09 '13 at 18:26
  • 1
    Not that I know of, although I don't have that much experience. Perhaps from looking through the [source code](https://bitbucket.org/birkenfeld/pygments-main/src/7304e4759ae6/pygments/styles?at=default) you get extract some of the available styles. – Chris Aug 10 '13 at 14:14

2 Answers2

0

here's a great starting place, a repository of sample pygments stylesheets:

https://github.com/richleland/pygments-css

thanks @richleland, whoever you are

Doug Lee
  • 768
  • 8
  • 10
0

You can find an MIT licensed PHP class for working with Git's Markdown web service along with the necessary Pygments style sheet here:

http://firefly.us/blog/web-development/introducing-gitdown-a-markdownpygments-class-for-php

JMU
  • 1