Wednesday
0
Post codes in blog
1. Go to Design / Layout
2. Click Edit HTML
3. Tick "Expand Widget Templates" box
4. Find the tag "</body>"
5. Add this code just before/above the tag "</body>"
6. Now to add source code to a post, it should be placed in <pre> tag.
2. Click Edit HTML
3. Tick "Expand Widget Templates" box
4. Find the tag "</body>"
5. Add this code just before/above the tag "</body>"
<!-- ADD SOURCE CODES TO BLOG POSTS -->
<link href='http://lockimage.googlepages.com/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>
<script language='javascript' src='http://lockimage.googlepages.com/shCore.js'/>
<script language='javascript' src='http://lockimage.googlepages.com/shBrushCpp.js'/>
<script language='javascript'>
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll("code");
</script>
<!-- END OF SOURCE CODES -->
6. Now to add source code to a post, it should be placed in <pre> tag.
<pre class="Cpp" name="code">
...insert code here...
</pre>
Subscribe to:
Post Comments (Atom)
0 Responses to “Post codes in blog”
Post a Comment