syntaxHighlighter-plusのプラグイン
10 月.01, 2008 in
plugins
WordPressにsyntaxHighlighter-plusのプラグインをインストールしたときのメモ
下記URLからsyntaxHighlighter-plusをダウンロード、下の方にリンクがある。(私がダウンロードしたものはsyntaxhighlighter-plus.0.18.zip)
http://thislab.com/2007/12/16/release-wordpress-plugin-syntaxhighlighter-plus/
解凍して出来たファイル
- shlfiles
- syntaxhighlighter.php
をプラグインディレクトリにアップロードする
/ブログのアドレス/wp-content/plugins/ここにアップロード
プラグインを使用可能にブログから設定する。
スタイルシートは自動で読み込まれるみたいだがJavascriptは読み込まれないようなので、フッターのパーミッションを書き込み可能にしてから、テンプレートを編集し、フッターの</body>の直前に以下のように書き加える。
<!-- SyntaxHighlighter Start -->
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shCore.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushCpp.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushCss.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushJScript.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushPhp.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushSql.js"></script>
<script type="text/javascript" src="ブログのアドレス/wp-content/plugins/syntaxhighlighter-plus/shlfiles/shBrushXml.js"></script>
<script type="text/javascript">dp.SyntaxHighlighter.HighlightAll('code');</script>
<!-- SyntaxHighlighter End -->
Tags: syntaxHighlighter-plus

Leave a Reply