I have seen many different ways to highlight code in the Rails community.
- The GitHub team loves Pygments . They use it in many different places, including Jekyll and GitHub. The downside is that it is a python library, so you will need to install python and execute it as a shell task.
- SyntaxHighlighter is another popular JavaScript solution. This is the one that has been adopted by WordPress and Yahoo! There are many different Rails plugins for this, even if the integration does not really require a plugin.
- Ruby offers 3 Gems code highlighting: Ultraviolet , Syntax, and CodeRay . AFAIK, the last one is most in demand.
I have tried all these solutions in the past. I actually use Pyigs for several Jekyll blogs and JavaScript-based solutions in all other cases.
source share