Tuesday, January 1, 2013

Syntax Highlighter is enabled

I have enabled Syntax Highlighter in my blog. It's an open source Java Script client side code syntax highlighter. I can say that it's considered as the most used script for that purpose and there are many many people and companies who use it in their own blogs or websites. Check this link to know who else is using it. I have checked the themes provided here and I liked the eclipse theme so it's the one enabled here at the moment. Now it's time to say Hello World!.

/**
 * @author Belal
 *
 */
public class HelloWorld {

 /**
  * @param args
  */
 public static void main(String[] args) {
  System.out.println("Syntax Highlighter: Hello World!");
 }
}

It's important to make sure that the code used with this script is character escaped. Postify would do that for you. So now I can say that the blog is ready to start posting some code snippets, stay around ;)

References:
1- Blog post that shows the steps to enable Syntax Highlighter in your blog.
2- Another useful blog post.
3- Syntax Highlighter by Alex Gorbatchev.
3- Postify for characters escaping.
4- Moreover for characters escaping http://www.freeformatter.com/html-escape.html

No comments:

Post a Comment