Skip to content

Instantly share code, notes, and snippets.

@w1shen
Last active December 14, 2015 18:19
Show Gist options
  • Save w1shen/5128307 to your computer and use it in GitHub Desktop.
Save w1shen/5128307 to your computer and use it in GitHub Desktop.
Include the following code in front of the end html tag of your template file.
<!-- Syntax Highlighter Additions START -->
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js' type='text/javascript'/>
<script language='javascript' type='text/javascript'>
//<![CDATA[
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.config.bloggerMode = true;
function alexgorbatchev() {
var args = arguments;
var result = [];
for (var i = 0; i < args.length; i ) {
result.push(args[i].replace('@', 'http://alexgorbatchev.com/pub/sh/current/scripts/'));
}
return result
};
SyntaxHighlighter.autoloader.apply(null, alexgorbatchev(
'applescript @shBrushAppleScript.js',
'actionscript3 as3 @shBrushAS3.js',
'bash shell @shBrushBash.js',
'coldfusion cf @shBrushColdFusion.js',
'cpp c @shBrushCpp.js',
'c# c-sharp csharp @shBrushCSharp.js',
'css @shBrushCss.js',
'delphi pascal @shBrushDelphi.js',
'diff patch pas @shBrushDiff.js',
'erl erlang @shBrushErlang.js',
'groovy @shBrushGroovy.js',
'java @shBrushJava.js',
'jfx javafx @shBrushJavaFX.js',
'js jscript javascript @shBrushJScript.js',
'perl pl @shBrushPerl.js',
'php @shBrushPhp.js',
'text plain @shBrushPlain.js',
'py python @shBrushPython.js',
'ruby rails ror rb @shBrushRuby.js',
'sass scss @shBrushSass.js',
'scala @shBrushScala.js',
'sql @shBrushSql.js',
'vb vbnet @shBrushVb.js',
'xml xhtml xslt html @shBrushXml.js'
));
SyntaxHighlighter.all();
//]]>
</script>
<!-- Syntax Highlighter Additions END -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment