Skip to content

Instantly share code, notes, and snippets.

@hanxue
Created March 26, 2014 10:06
Show Gist options
  • Save hanxue/9780123 to your computer and use it in GitHub Desktop.
Save hanxue/9780123 to your computer and use it in GitHub Desktop.
Syntax Highlighting on Blogger
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
@mushfiqur-rahman
Copy link

Those links are doesn't exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment