在Moin中使用pygments

关键字: MoinMoin, pygments

想给自己的东西分个类,于是又一次架起了MoinMoin,不满足于里面自带的parser,想起来了pygments好像有对MoinMoin的支持,于是乎就去找了。

找到了结果,其实很简单,把pygments的external文件夹下的一个文件拷到自己wiki的data/plugin/parser下,然后改成你想要的名字(如code.py)就可以了,然后写代码就包在{{{}}}块中,然后加上#!code <foobar>,以告诉它用那个东西处理,处理的语言是foobar,然后记得把css加到想要的地方就行了,嗯。

很简单,但是比原来的好看多了,不过还是要把它CSS中pre的默认字体改一下,嗯。

This entry was posted in 小企鹅Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>