Tuesday, June 14, 2011

Another test, this time with highlights!

Ok so I've just tried setting up Syntax-highlighter. If this works, it
was very easy, everything is explained very well on the website.
Ok so all we need to change from that, though, using the autoloader is
that it seems blogger needs the autoloader javascript to be encased in
<[CDATA[ ]]> tags.
now lets see if this works:
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeEmacs.css"
      rel="stylesheet" type="text/css" />
<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 type="text/javascript">
'js   http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js',
'php  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js',
'bash http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js',
'c    http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js',
'css  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js',
'py   http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js',
'sql  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js',
'xml  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js',

SyntaxHighlighter.config.bloggerMode = true;
Edit: This isn't using syntax highlighter any more, I think I may have found a somewhat more preferable solution.

1 comment:

  1. So cannout you use the autoloader, too? :( In this afternoon, I found it had something wrong, and remove the autoloader and use the static loader. Everything work correctly. Orz