You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git-test/blog/static/pygments
车亮亮 df3218fa06
修改代码高亮,增加谷歌广告
9 years ago
..
README.rst 修改代码高亮,增加谷歌广告 9 years ago
UNLICENSE.txt 修改代码高亮,增加谷歌广告 9 years ago
autumn.css 修改代码高亮,增加谷歌广告 9 years ago
borland.css 修改代码高亮,增加谷歌广告 9 years ago
bw.css 修改代码高亮,增加谷歌广告 9 years ago
colorful.css 修改代码高亮,增加谷歌广告 9 years ago
default.css 修改代码高亮,增加谷歌广告 9 years ago
emacs.css 修改代码高亮,增加谷歌广告 9 years ago
friendly.css 修改代码高亮,增加谷歌广告 9 years ago
fruity.css 修改代码高亮,增加谷歌广告 9 years ago
github.css 修改代码高亮,增加谷歌广告 9 years ago
manni.css 修改代码高亮,增加谷歌广告 9 years ago
monokai.css 修改代码高亮,增加谷歌广告 9 years ago
murphy.css 修改代码高亮,增加谷歌广告 9 years ago
native.css 修改代码高亮,增加谷歌广告 9 years ago
package.json 修改代码高亮,增加谷歌广告 9 years ago
pastie.css 修改代码高亮,增加谷歌广告 9 years ago
perldoc.css 修改代码高亮,增加谷歌广告 9 years ago
tango.css 修改代码高亮,增加谷歌广告 9 years ago
trac.css 修改代码高亮,增加谷歌广告 9 years ago
vim.css 修改代码高亮,增加谷歌广告 9 years ago
vs.css 修改代码高亮,增加谷歌广告 9 years ago
zenburn.css 修改代码高亮,增加谷歌广告 9 years ago

README.rst

pygments-css
============

Pygments_, a Python-based code highlighting tool, comes with a set of builtin styles_ (not css files) for code highlighting. You have to generate a CSS file using the command line. I just figured I'd save someone this work in the future and generate all the CSS files based on the Pygments builtins.

Pretty simple stuff here. These css files were generated using pygmentize
on the command line like so::

    pygmentize -S default -f html > default.css

I'm using a combination of Pygments and Markdown on a django project that has a model with the following save method::

    def save(self):
        self.html = markdown(self.body, 'codehilite')
        super(Entry, self).save()

That's why the CSS styles all have .codehilite in front of them. You should change the .codehilite to work with the style name that you use for your Pygments HTML output.

.. _Pygments: http://pygments.org
.. _styles: http://dev.pocoo.org/projects/pygments/browser/pygments/styles

Theme previews
--------------

To preview the various themes, check out http://richleland.github.io/pygments-css/.