How to implement the code highlight as bootstrap's example

Freewind picture Freewind · Jul 12, 2012 · Viewed 33.7k times · Source

I found the bootstrap's code highlight has a very good style for code blocks.

bootstrap

I find it using google-code-prettify, but I tried google code prettify, the style is different:

google-code

How to implement the same as bootstrap's ?

Answer

Vino picture Vino · Oct 29, 2016

Not sure if you want code highlighting dynamically at run-time or generated for static use.

The TWBS Bootstrap project uses the static generated method by generating it's content with a Ruby toolset called Jekyll, the Liquid Template Engine, some custom code, and Markdown file sources.

If you need highlighting generated dynamically then there are a few options available, the most popular beeing: