문서의 이전 판입니다!
목차
plugins
Box plugin Syntax
A simple box:
<box> the box contents </box>
Some more complex boxes
<box 80% round orange|a title> the box contents</box> <box 50% left blue>the box contents</box|a caption> <box 60% round #f99 #fc9 #fcc #f60|title>the box contents</box|caption>
a title
a caption
title
caption
The full syntax:
<box width classes colours | title text> contents text </box>
- width — any legal CSS width value
- classes — any number of classes which use the styles in your template or the plugin's own stylesheet to determine the look of the box. The box plugins comes with the following classes already defined:
- round — box will have rounded corners
- blue — blue colour scheme
- red — red colour scheme
- green — green colour scheme
- orange — orange colour scheme
- left — float the box left within the wiki page
- right — float the box right within the wiki page
if no classes are specified the default styles will be used, that is square corners in a colour scheme based on the default DokuWiki colour scheme.
- colours — 1-4 colours in CSS hex or RGB notation, e.g.
#F00 #fcab94 rgb(255,255,0). The colours are applied in order to:- content background
- title background
- outer box background
- borders
if less than four colours are specified, the first colour is used for the missing colours.
- title text — text (including DokuWiki markup) displayed above the box contents, with distinct style.
- caption text — text (no markup allowed) displayed below the box contents, with distinct style.
The opening <box … > including the title must all appear on one line. The box contents can appear over as many lines as are needed.
See the plugin in action here. The sample page shows all the'styles available with the plugin.
folded
Inline:
This is example ++text | with some of it only shown when you unfold it++. And after that the text just continues to flow in the same paragraph.
This is example text . And after that the text just continues to flow in the same paragraph.
Block:
This is example text. ++++ Title |
| This table | is only shown | when you unfold the block |
{{page>some other wiki page&inline}}
++++
This is example text.
This is example title text.
| Inline | Block | |
|---|---|---|
| Syntax | ++title| formatted text ++ | ++++title| any content ++++ |
| HTML | <span> tag | <div> tag |
| Can contain formatting | | |
| Can contain block elements1) | — | |
| Can be used within a paragraph, table, list, etc. | | — |
select
<select Example> wiki:plugins|Plugin Top plugin:select|Select plugin </select>
<select Example> wiki:plugins|Plugin Top wiki:manual_update|수동 업데이트 방법 wiki:plugins#select|Select plugin </select>
SyntaxHighlighter4 plugin
https://github.com/crazy-max/dokuwiki-plugin-syntaxhighlighter4
Example
<sxh php; first-line: 89; highlight: [106,107]; title: New title attribute in action>
/**
* Render xhtml output or metadata
*
* @param string $mode Renderer mode (supported modes: xhtml)
* @param Doku_Renderer $renderer The renderer
* @param array $data The data from the handler() function
* @return bool If rendering was successful.
*/
public function render($mode, Doku_Renderer &$renderer, $data) {
if($mode != 'xhtml') return false;
if (count($data) != 3) {
return true;
}
list($syntax, $attr, $content) = $data;
if ($syntax == 'sxh') {
$title = $this->procTitle($attr);
$highlight = $this->procHighlight($attr);
$renderer->doc .= '<pre class="brush: ' . strtolower($attr . $highlight) . '"' . $title . '>' . $renderer->_xmlEntities($content) . '</pre>';
} else {
$renderer->file($content);
}
return true;
}
</sxh>
/**
* Render xhtml output or metadata
*
* @param string $mode Renderer mode (supported modes: xhtml)
* @param Doku_Renderer $renderer The renderer
* @param array $data The data from the handler() function
* @return bool If rendering was successful.
*/
public function render($mode, Doku_Renderer &$renderer, $data) {
if($mode != 'xhtml') return false;
if (count($data) != 3) {
return true;
}
list($syntax, $attr, $content) = $data;
if ($syntax == 'sxh') {
$title = $this->procTitle($attr);
$highlight = $this->procHighlight($attr);
$renderer->doc .= '<pre class="brush: ' . strtolower($attr . $highlight) . '"' . $title . '>' . $renderer->_xmlEntities($content) . '</pre>';
} else {
$renderer->file($content);
}
return true;
}
- 옵션 : https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Configuration#per-element-configuration
- autoLinks: (Default true) URL을 클릭하면 이동할 수 있도록 수정
- className: (Default null)
- firstLine: (Default 1) 시작 번호
- gutter: (Default true) 줄번호 표시 유무
- highlight: (Default null) 강자할 문법 설정
- htmlScript: (Default false)
- smartTabs: (Default true)
- tabSize: (Default 4)
Page Redirect Plugin Syntax
~~REDIRECT>namespace:page~~ ~~REDIRECT>http://example.com~~
plantumlparser Plugin
https://www.dokuwiki.org/plugin:plantumlparser
<uml> Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: another authentication Response </uml>