I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

WikiNG Syntax Extensions

You can play with the syntax using the playground.

Links

Redmine links

The WikiNG plugin adds support for links to other resources:

  • Users:
    Use user(me)#1 or user(me):s-andy to display different text (“me”).
    Use user[f]#1 or user[f]:s-andy to use format, where f is f (first name), u (username), fl (first name, last name) or lf (last name, first name). Version 1.1.0 also support l (last name).
  • Files (which can be found under the Files tab):
    Use file(here)#349 or file(here):wiking-0.0.2.tar.bz2 to display different text (“here”).

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

Similar look and feel can be achieved without WikiNG plugin. For example, “tip” can be shown as p(tip). but you need to declare “tip” CSS class.

Warnings

<warning>
A block cannot contain empty lines.
</warning>

Display:

A block cannot contain empty lines.

Notices

notice. WikiNG blocks support formatting: e.g. *bold*, +underline+ etc.

Display:

WikiNG blocks support formatting: e.g. bold, underline etc.

Tips

tip. Like other Wiki blocks (e.g. @p.@) WikiNG blocks support alignment: e.g. @tip>.@.

Display:

Like other Wiki blocks (e.g. 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.

There should be no space between the opening parentheses (( 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 @}->-.

There should be a space or a punctuation mark before and after the smiley.
Smiley code is quite flexible that is :) 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.:
    Simple shadow demo
  • mac-shadow → Mac-style shadow, e.g.:
    Mac shadow demo
  • 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% or p(wiking small). small paragraph
    • This small-text paragraph was created using %(wiking small)...%...

Look and feel of these CSS classes differ for the Red-Andy, which is used on this site, and other themes.

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.

It is recommended to uncheck "Cache formatted text" in Administration -> Settings -> General for {{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

shadow-demo.png View - Simple shadow demo (3.53 KB) Andriy Lesyuk, 02 Dec 2012 13:29

mac-shadow-demo.png View - Mac shadow demo (4.27 KB) Andriy Lesyuk, 02 Dec 2012 13:29

Terms of use | Privacy policy