ユーザ用ツール

サイト用ツール


dokuwiki:plugin:codeprettifier

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
dokuwiki:plugin:codeprettifier [2015/09/10 04:39] matsuidokuwiki:plugin:codeprettifier [2015/10/07 00:31] (現在) – 外部編集 127.0.0.1
行 1: 行 1:
 +====== code Prettifier Plugin ======
  
 +[[https://www.dokuwiki.org/plugin:codeprettify#examples_usage]]
 +
 +<code>
 +<code:php linenums:1 |Example #1 Our first PHP script: //hello.php//>
 +<html>
 +  <head>
 +  <title>PHP Test</title>
 + </head>
 + <body>
 + <?php echo '<p>Hello World</p>'; ?> 
 + </body>
 +</html>
 +</code>
 +</code>
 +
 +<code:php linenums:1 |Example #1 Our first PHP script: //hello.php//>
 +<html>
 +  <head>
 +  <title>PHP Test</title>
 + </head>
 + <body>
 + <?php echo '<p>Hello World</p>'; ?> 
 + </body>
 +</html>
 +</code>
 +
 +下記のようにすると、旧タグの<key><code></key>を上書きしてくれます。
 +<code php| lib/plugins/codeprettify/conf/default.php>
 +$conf['override'] = 0;  // override DW syntax disabled
 + ↓
 +$conf['override'] = 1;  // override DW syntax disabled
 +</code>
 +
 +
 +===== skin =====
 +
 +下記を編集すればスキンを変更できます。
 +
 +<code linenums:15| lib/plugins/codeprettify/conf/default.php>
 +$conf['skin'          = '';
 +   ↓
 +$conf['skin'          = 'desert.css';
 +</code>
 +
 +
 +デフォルトで下記4つのスキンが用意されています。
 +desert.css
 +doxy.css
 +sons-of-obsidian.css
 +sunburst.css
 +
 +下記のCSSを持ってきて利用もできます。
 +[[http://jmblog.github.io/color-themes-for-google-code-prettify/]]
 +
 +
 +
 +{{tag>dokuwiki:plugins syntax}}