Sebelum membuat tulisan diblog saya ini, saya ingin menshare bagaimana menuliskan code-code ke dalam tag khusus. Atau dinamakan Syntax Hlighter,baik langsung saja kita praktikan bagaimana membuat atau konfigurasi di blogger. Silahkan login di blogger anda dan pilih template, kemudian pilih edit html. Silahkan ikuti langkah-langkah dibawah ini :
- Copy code css di link berikut "http://syntaxhighlighter.googlecode.com/svn/trunk/Styles/SyntaxHighlighter.css", dan tambahkan sebelum tag "]]></b:skin>".
- Copykan code javascript dibawah ini, dan letakkan sebelum "</head>".
- Copykan code javascript dibawah ini, dan letakkan sebelum "</body>". Kemudian klik simpan template.
- Pengunaan nya pada saat penulisan pilih tag "html" dan setiap akan menuliskan code pemrograman anda silahkan tambahkan code seperti contoh dibawah ini:
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCSharp.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCss.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushDelphi.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJava.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJScript.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPhp.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPython.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushRuby.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushSql.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushVb.js" type="text/javascript"></script> <script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script>
<script language="javascript">
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');
</script>
<pre name="code" class="css"> /*coding di sini*/ </pre>Demikan tutorial perdana saya, semoga bermanfaat bagi teman-teman.
Tidak ada komentar:
Posting Komentar