Hello Mari

Rojesh, ta pani blog bana aba
This is how codes look through Syntax Highlighter. It has a lot of customization options and you can include the source in your website to speed this up like it works natively. Right now, its being served from http://alexgorbatchev.com which makes it slower than usual; otherwise it is a very light code that doesn't affect anything much.
System.Out.Print("Hello Mari");

The codes I've used are:
<!-- you have to paste this all before the actual post or ONCE in the main template -->
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> 
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeRDark.css' rel='stylesheet' type='text/css'/> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'></script> 
<script language='javascript'> 
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
Go here to learn this shit yourself
And this is how it looks with Rainbow Highlighter. Visit http://eager.io to get started
System.Out.Print("Hello Mari");
Rainbow highlighter has very limited options but it works with a single line of embed code.

Advantages of using Syntax Highlighter
  • Its FAST and you can customize the hell out of it. You can also put it in your FTP server folder so that it loads natively
  • It is straight forward ; One Bush and a couple of prerequisites. This means it only loads the required amount of resources
Advantages of using Rainbow Highlighter
  • It is EASY. Go to their website, register yourself, enter a site and get an embed code
  • Embed codes are one-liners, which means that a single line above each post should work
Hindsight:
  • If you use Syntax Highlighter, you have to constantly format your code for < and > with &gt; and &lt; respectively. No need for this in Rainbow Highlighter (as you might see when you actually study the code that makes this happen)
  • Rainbow Highlighter has limited language support. For all unsupported languages, it uses a Generic language structure. It works, but it really does not lol.
  • I haven't tested this part, but I think Rainbow Highlighter will hiccup or work unexpectedly if you constantly keep including the same embed code in separate posts instead of the main template. It may also unexpectedly stop working if there is embed code in the template and your post as well....soooo not future proof at all :P (This problem MIGHT just be tackled if you use it directly from your site. To do this, you have to go here and learn yourself cause I'm too lazy to do anymore. There is also a Github repo for latest stuff <3 ...well on that end, there is also a Syntax Highlighter Repo, if you must know)
  • Syntax Highlighter is made by Alex Gorbatchev. He is easy to get in touch with, and since Syntax Higlighter has been around since 2004, it has more support.
  • Finally, it depends upon you and your needs. Do you need incredible cutomizability, or ease of use?

No comments:

Post a Comment