More stories

Show me code

20 Nov 2013

Ghink uses Google Code Prettify to render beautiful syntax highlighted code sections. Like this:

function bee(n) {
	var r=0;
	for(var i=0;i<n;i++) {
		r+=i^2;
	}
	return(r);
}

Languages are automatically identified.

To write code on a page use this syntax, as explained here:

``` var code = 42; ```

You can also change the highlighter theme by setting the prettify_theme global variable. See here to know how.

source for this page here.