Cara Menambahkan Syntax Highlighter Untuk Blogger/Blogspot

Halo sobat bloggers kali ini saya akan menjelaskan cara menambahkan syntax highlighter untuk blogger/blogspot, apa itu syntax highlighter? syntax highlighter adalah paper script sangat berguna sekali untuk sobat bloggers yang sering membuat artikel tentang koding. Syntax highliter ini mempunya banyak brush loh. html, php, sql, dan lain-lain.

Cara Menambahkan Syntax Highlighter

  1. Login ke blogger anda
  2. Pilih menu Template > Edit HTML
  3. Copykan kode di bawah dan taruh di atas kode </head>
  4. <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/> 
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAS3.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushColdFusion.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDelphi.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDiff.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushErlang.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushGroovy.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPowerShell.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushScala.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'/>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
    <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
    <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
    
  5. Copykan kode di bawah dan taruh di bawah kode <body>
  6. <script language='javascript'>
    SyntaxHighlighter.config.bloggerMode = true;
    SyntaxHighlighter.all();
    </script>
    

Cara menggunakanya; gunakan kode <pre class="brush:html"> kodingan </pre> pada menu HTML saat membuat artikel, atau jika anda menggunakan bahasa pemograman lain tinggal mengganti brushnya saja contohnya <pre class="brush:javascript">
Previous
Next Post »

5 comments

Click here for comments
January 27, 2016 at 6:09 AM ×

kayaknya otak ane gak bakalan mampu untuk bljr coding2 gituan gan..! nice artikelnya bagi yg serius belajar coding gan

Reply
avatar
Fabio Handi
admin
January 27, 2016 at 6:51 AM ×

thans gan tutornya lengkap banget

Reply
avatar
Naufal
admin
January 27, 2016 at 7:43 AM ×

ijin nyoba buat di pasang di blog saya gan.. terima kasih

Reply
avatar
Unknown
admin
January 27, 2016 at 4:42 PM ×

ane baru tau nih tentang coding, thanks yah gan udah share

Reply
avatar
Unknown
admin
January 29, 2016 at 10:58 AM ×

Ane praktekin dulu gan :)

Reply
avatar
Thanks for your comment