문제

My research group uses a Wordpress blog. Frequently I want post snippets or even entire short programs I've been working on to it, with most of my code being written in C/C++ or scripting languages (Bash, TCL, etc).

I figure that there have to be some good extensions to Wordpress to colorify code since so many people use it. I'm looking for something similar to StackOverflow's colorizing system, though I realize it may not be quite as robust!

Can you point me to some of your favorites/the ones you think are most reliable?

Thanks in advance!

도움이 되었습니까?

해결책

This was the first I investigated when I started a Wordpress blog. You can use Wordpress' sourcecode shortcode, as exemplified here. It requires JavaScript on the client side (otherwise it renders as just preformatted text).

Cheers & hth.,

다른 팁

GeSHi is a good backend for highlighting lots of different languages. There are Wordpress plugins that support it, but I don't have a specific recommendation. (I use GeSHi for our wiki.)

You might also consider Pastie or Gist as a way to share snippets.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top