WikiNG Syntax Extensions¶
Links¶
Redmine links¶
The WikiNG plugin adds support for links to other resources:
- Users:
Useuser(me)#1
oruser(me):s-andy
to display different text (“me”).
Useuser[f]#1
oruser[f]:s-andy
to use format, wheref
isf
(first name),u
(username),fl
(first name, last name) orlf
(last name, first name). Version 1.1.0 also supportl
(last name).user#1
→ Andriy Lesyuk (link to user with id 1)user:s-andy
→ Andriy Lesyuk (link to user with username “s-andy”)- Since 1.1.0:
@s-andy
→ Andriy Lesyuk (link to user with username “s-andy”)
- Files (which can be found under the Files tab):
Usefile(here)#349
orfile(here):wiking-0.0.2.tar.bz2
to display different text (“here”).file#1
→ wiking-0.0.2.tar.bz2 (link to file with id 349)file:wiking-0.0.2.tar.bz2
→ wiking-0.0.2.tar.bz2 (link to file with filename “wiking-0.0.2.tar.bz2”)
External links¶
[[wikipedia>Ruby (programming language)|Ruby]]
displays a link to the Wikipedia page for “Ruby”: Ruby[[wikipedia[es]>Ruby]]
displays a link to a localized Wikipedia page: Ruby[[google>Redmine Wiki syntax]]
displays a link to the Google search results for “Redmine Wiki syntax”: Redmine Wiki syntax[[redmine>Plugins]]
displays a link to the Wiki page “Plugins” on Redmine.Org: Plugins[[redmine>#9638]]
displays a link to the issue #9638 on Redmine.Org: #9638
Text formatting¶
Blocks¶
WikiNG warning.
, notice.
and tip.
blocks support two syntaxes: block.
and <block>
... </block>
.
p(tip).
but you need to declare “tip” CSS class.Warnings¶
<warning> A block cannot contain empty lines. </warning>
Display:
Notices¶
notice. WikiNG blocks support formatting: e.g. *bold*, +underline+ etc.
Display:
Tips¶
tip. Like other Wiki blocks (e.g. @p.@) WikiNG blocks support alignment: e.g. @tip>.@.
Display:
p.
) WikiNG blocks support alignment: e.g. tip>.
.Footnotes¶
The footnote text can be written inline with double parentheses ((
and ))
:
The footnote index number is assigned automatically1.
((
and the text.Glyphs¶
The following character sequences are replaced by special characters:
=>
→ “⇒”, <=>
→ “⇔”, <=
→ “⇐”, ->
→ “→”, <->
→ “↔”, <-
→ “←”, --
→ “–” and ---
→ “—”.
Also a single quote inside a word or after a word is replaced by apostrophe, e.g. O’Reilly.
Smileys¶
Here are smileys which are currently supported by this plugin:
:)
→ , =)
→ , :D
→ , =D
→ , :'(
→ , :(
→ , ;)
→ , :P
→ , :O
→ , :/
→ , :S
→ , :|
→ , :X
→ , :*
→ , O:)
→ , >:)
→ , B)
→ , (!)
→ , (?)
→ , (v)
→ , (x)
→ and @}->-
→ .
:)
and :-)
are equivalent.Markers¶
The following markers are supported:
{TODO}
:
Alignments supported:{<TODO}
and{TODO>}
.{UPDATE}
:
Alignments supported:{<UPDATE}
and{UPDATE>}
.{FIXME}
:
Alignments supported:{<FIXME}
and{FIXME>}
.{NEW}
:
Alignments supported:{<NEW}
,{NEW>}
and{^NEW}
.{FREE}
:
Alignments supported:{<FREE}
,{FREE>}
and{^FREE}
.{BETA}
:
Alignments supported:{<BETA}
and{BETA>}
.{EXPERIMENTAL}
:
Alignments supported:{<EXPERIMENTAL}
and{EXPERIMENTAL>}
.
CSS Classes¶
The Redmine Textile supports specifying CSS class names in Wiki elements. Thus, you can write, e.g., p(yourclass).
to use the yourclass
CSS class for the p.
element.
WikiNG comes with some CSS classes especially designed to be used in WIki. All these CSS classes should be used along with the special wiking
class, e.g., element(wiking classname).
.
shadow
→ simple shadow, e.g.:mac-shadow
→ Mac-style shadow, e.g.:pressed
→ make a code block have pressed effect, e.g.:<pre class="wiking pressed"><code class="html"> </code></pre>
button
→ make a link look and behave like a button, e.g.:
Check Redmine.Org → was created using"(wiking button)Check Redmine.Org":http...
small
-> make text slightly smaller, e.g.:%(wiking small)small text%
orp(wiking small). small paragraph
- This small-text paragraph was created using
%(wiking small)...%
...
Macros¶
User-defined macros¶
WikiNG allows Redmine administrators to easily extend the Wiki syntax by creating custom macros via the web interface (using Administration -> Custom Wiki macros). In this way, you can embed videos, insert links to third-party systems and much more. See more details here.
Conditions¶
This plugin introduces macros {{date}}
and {{version}}
which allow specifying condition when inner text should be rendered.
{{date}}
and {{version}}
macros to work properly.Date¶
Example: {{date >= 2011-01-01}}Text to be displayed{{date}}
.
Version¶
Example: {{version >= 1.1.0}}Text to be displayed{{version}}
.
Hooks¶
The plugin adds a Wiki macro allowing to call a custom hook (a hook with a custom name) on a page.
For example to create and call hook :wiking_hook_demo
write {{wiking_hook(demo,argument,option=value)}}
.
Display:
controller.class.name = WikiController project.name = WikiNG request.params = {"controller"=>"wiki", "action"=>"show", "project_id"=>"wiking", "id"=>"Syntax"} page.page.title = Syntax args = ["argument"] options = {:option=>"value"}
In order to use custom hooks you need to handle them! Check this page on how this can be done.
Check source:app/views/wiking/_demo_hook.rhtml for the code which handles this hook.
1 This footnote syntax does not conflict with the native one