WordPressでソースコード色分け表示
参考:
「iG:Syntax Hiliter」の紹介。
http://jmblog.jp/archives/62
導入
・http://blog.igeek.info/wp-plugins/igsyntax-hiliter/
→ iG_Syntax_Hiliter.zip をダウンロード。
・解凍すると以下のようなファイル階層ができる。
iG-Syntax Hiliter
├COPYING
├GNU GPL.txt
├MANUAL.html
├READ ME.txt
└ig_syntax hiliter plugin
├syntax_hilite.php
└is_syntax_hilite
├…
├…
├…
・syntax_hilite.php と is_syntax_hilite を /wp-content/plugins にアップロード。
・[サイト管理] - [プラグイン] に [iG:Syntax Hiliter] が表示されるようになるので、これを有効化。
使用
[cpp]~[/cpp] を試す。
b=test(a);
if(b){
printf("Hello\n");
}
while(a<10 && a>1){
a++; //※←ここのインデントはTABを使ってみてる。
}
[perl]~[/perl] を試す。
[code]~[/code] を試す。
> echo "abc"
This entry was posted on 木曜日, 10 月 16th, 2008 at 23:19 and is filed under WordPress, プラグイン. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.