Tuesday, February 25, 2014

SyntaxHighlighter

I mentioned in my previous post that I'm using  SyntaxHighlighter. Well, it took some configuring!
First off, I followed this tutorial. But then nothing would happen. Turns out, at least for me, the SyntaxHighlighter.config.clipboardSwf link got converted to the HTML encoding of the quotes, no matter what I did. Then I eventually found out that you need to write like this to prevent encoding (with the CDATA)

And then, all of my links kept getting forwarded to https://alekgorbatchev... (instead of http://) which meant that nothing worked when I tried to preview the page. Turns out this is because of the new browser "feature" that looks for secure webpages if viewed from a secure webpage. And if I previewed the page, blogger (or is it Google Chrome) automatically makes it secure (since the new post page is secure). So if you want to preview it, you should manually remove the https. It has no effect on people viewing the page, since they are viewing the non-secure version when they look at your blog. In any case, this is the final version of what I have before my </head> tag (notice the lack of http: and the agorbatchev.typepad.com/pub/sh/3_0_83 instead of alexgorbatchev.com/pub/sh/current/):



No comments:

Post a Comment