Selasa, 20 Desember 2016

Instalasi syntax highlighting


Penulis beritahukan kepada teman-teman bahwa dengan adanya update library dari http://alexgorbatchev.com/SyntaxHighlighter/ maka tutorial di blog ini yang berjudul Cara memasang Syntax-Highlighter di Blog sudah kadaluarsa karena sudah tidak bisa digunakan lagi.

Untuk update tutorial Instalasi syntax highlighting yang terbaru silahkan simak tutorial berikut :

Misi membuat style kode pemrograman seperti gambar dibawah ini

Caranya :

cari (pakai Find, CTRL+F) :
Salin kode berikut lalu paste sebelum kode </head> .
<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'/> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'></script> 
<script language='javascript'> 
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
Penulisan source code seperti berikut, disesuaikan dengan bahasa pemrograman
<pre class="brush: html">
.....kode programmu
</pre>
atau
<pre class="brush: js">
.....kode programmu
</pre>
atau
<pre class="brush: css">
.....kode programmu
</pre>
dll..
untuk lebih lengkapnya lihat daftar class brush di link berikut http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Justin Bieber, Gold Price in India