ユーザ用ツール

サイト用ツール


このページの翻訳:



最近の更新



Tag Cloud

dokuwiki:plugin:codeprettifier

code Prettifier Plugin

https://www.dokuwiki.org/plugin:codeprettify#examples_usage

<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>

Example #1 Our first PHP script: hello.php

  1. <html>
  2. <head>
  3. <title>PHP Test</title>
  4. </head>
  5. <body>
  6. <?php echo '<p>Hello World</p>'; ?>
  7. </body>
  8. </html>

下記のようにすると、旧タグの<code>を上書きしてくれます。

lib/plugins/codeprettify/conf/default.php

$conf['override'] = 0;  // override DW syntax disabled
 
$conf['override'] = 1;  // override DW syntax disabled

skin

下記を編集すればスキンを変更できます。

lib/plugins/codeprettify/conf/default.php

  1. $conf['skin'] = '';
  2.    
  3. $conf['skin'] = 'desert.css';

デフォルトで下記4つのスキンが用意されています。
desert.css
doxy.css
sons-of-obsidian.css
sunburst.css

下記のCSSを持ってきて利用もできます。
http://jmblog.github.io/color-themes-for-google-code-prettify/

dokuwiki/plugin/codeprettifier.txt · 最終更新: 2015/10/07 09:31 by 127.0.0.1