Created
March 26, 2014 10:06
-
-
Save hanxue/9780123 to your computer and use it in GitHub Desktop.
Syntax Highlighting on Blogger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Add this before </body> | |
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> | |
2. Encapsulate your code block with <pre> tag and the "prettyprint" class | |
<pre class="prettyprint"> | |
$(function() { | |
alert('I am using Prettify as Syntax Highlighter'); | |
}); | |
</pre> | |
You can also define different styles | |
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=desert"></script> | |
List of styles available - http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Those links are doesn't exist