WikiCreole markup overview
Features currently not working with moin’s WikiCreole parser are marked with CREOLETODO.
Features currently not working with moin’s rst parser are marked with reSTTODO.
Headings
Markup:
= Level 1
== Level 2
=== Level 3
==== Level 4
===== Level 5
====== Level 6
Result:
Level 1
Intentionally not rendered as level 1 so it does not interfere with Sphinx’s indexing
Level 2
Level 3
Level 4
Level 5
Level 6
Notes:
Closing equals signs are optional and do not affect the output. Also, whitespace between the first word of the heading and the opening equals sign will not be shown in the output (ie. leading whitespace is stripped).
Text formatting
The following is a table of inline markup that can be used to format text in Creole.
Markup |
Result |
---|---|
|
Bold text |
|
Italic Text |
|
Bold and Italic |
|
Underline |
|
|
|
First line
Second line
|
reSTTODO: Restructured Text line blocks are not working in Moin2
Hyperlinks
Internal links
Markup |
Result |
Comment |
---|---|---|
|
Link to an item |
|
|
Named link to an internal item |
|
|
Link to an anchor in the current item |
|
|
Link to a named anchor. |
|
|
Link to an anchor in an internal item |
|
|
Link to a sub-item of an internal item |
|
|
Link to a sibling of the current item |
|
|
Link to a sub-item |
|
|
Link to a sub-item called Filename.txt.
Note that this is for MoinMoin 1.x
compatability and is deprecated in favour
of the more convenient |
External links
Markup |
Result |
Comment |
---|---|---|
|
External link |
|
|
External link |
|
|
Link to an item on an external Wiki |
|
|
Mailto link |
Images and Transclusions
Markup |
Comment |
---|---|
|
Embed example.png inline |
|
Embed example.png inline or display “Alt text” if not available |
|
Transclude (embed the contents of) ItemName inline. |
|
Transclude SubItem inline. |
Paragraphs
Markup:
You can leave an empty line to start a new paragraph.
Single breaks are ignored.
To force a line break, use <<BR>> or \\.
Result:
You can leave an empty line to start a new paragraph.
reSTTODO: reStructuredText line blocks are not working in Moin2
Horizontal rules
Markup:
A horizontal rule can be added by typing four dashes.
----
This text will be displayed below the rule.
Result:
A horizontal rule can be added by typing four dashes.
This text will be displayed below the rule.
Preformatted text
Markup:
{{{
This text will [[escape]] **special** WikiCreole //markup//
It will also preserve indents
And whitespace.
}}}
~[[This text will not be a link, because it uses the tilde (~) escape character]]
Result:
This text will [[escape]] **special** WikiCreole //markup//
It will also preserve indents
And whitespace.
[[This text will not be a link, because it uses the tilde (~) escape character]]
Notes:
This tilde character (~
) makes the parser ignore the character following it, which can be used to prevent links from appearing as links or prevent bold text from appearing as bold. For example “~**Not bold~**
” would output “**Not bold**”).
Syntax Highlighting
Markup:
{{{
#!python
#Python syntax highlighting
import this
def spam():
print('Spam, glorious spam!')
spam()
}}}
Result:
#Python syntax highlighting
import this
def spam():
print('Spam, glorious spam!')
spam()
CREOLETODO:The use of syntax highlighting currently crashes moin.
Lists
Ordered lists
Ordered lists are formed of lines that start with number signs (#
).
The number of ‘#’ signs at the beginning of a line determines the current level.
Markup:
# First item
# Second item
## First item (second level)
## Second item (second level)
### First item (third level)
# Third item
Result:
First item
Second item
First item (second level)
Second item (second level)
First item (third level)
Third item
Unordered lists
Markup:
* List item
* List item
** List item (second level)
*** List item (third level)
* List item
Result:
List item
List item
List item (second level)
List item (third level)
List item
Mixed lists
Markup:
# First item
# Second item
** Bullet point one
** Bullet point two
# Third item
# Fourth item
Result:
First item
Second item
Bullet point one
Bullet point two
Third item
Fourth item
Tables
Markup:
|= Header one |= Header two |
| Cell one | Cell two
| Cell three | Cell four |
Result:
Header one |
Header two |
---|---|
Cell one |
Cell two |
Cell three |
Cell four |
Notes:
Table cells start with a pipe symbol (|
), and header cells start with a pipe symbol and equals sign (|=
).
The closing pipe symbol at the end of a row is optional.
Macros
Macros are extensions to standard Creole markup that allow developers to add extra features. The following is a table of MoinMoin’s Creole macros.
Markup |
Comment |
---|---|
|
Inserts an anchor named “anchorname” |
|
Inserts a forced linebreak |
|
Inserts current date, or unix timestamp or ISO 8601 date |
|
Inserts current datetime, or unix timestamp or ISO 8601 |
|
Loads I18N texts, Einstellungen if browser is set to German |
|
Loads var1 value from metadata of item named WikiDict |
|
Inserts a footnote saying “Note here” |
|
displays Font Awsome icon, color and size are optional |
|
displays icon from /static/img/icons |
|
Embeds the contents of |
|
Lists subitems of current item, see notes for options |
|
If the user is logged in this macro will display
|
|
Shows a monthly calendar in a table form, see notes for details |
|
Inserts names of 3 random items |
|
displays all icons in /static/img/icons directory |
|
Shows a table of contents up to level 2 |
|
Inserts text as entered, no markup rendering |
Notes
Date and DateTime macros accept integer timestamps and ISO 8601 formatted date-times:
<<Date(1434563755)>>
<<Date(2002-01-23T12:34:56)>>
Footnotes are created by placing the macro within text. By default footnotes are placed at the bottom of the page. Explicit placement of footnotes is accomplished by calling the macro without a parameter.
text<<FootNote(A macro is enclosed in double angle brackets, and’’’may’’’ have markup.)>> more text
<<FootNote()>>
FontAwesome color must be a hex digit color code of either 3 or 6 digits with a leading #: #f00 or #F80000. FontAwesome size must be an unsigned decimal integer or float that will adjust the size of the character relative to the current font size: 2 or 2.0 will create double the character size, .5 will create a character half the current size. Font awesome experts will know about the special “fa” class and the “fa-” name prefixes. It is acceptable, but not necessary to provide these. See https://fontawesome.com/v4/cheatsheet/
<<FontAwesome(thumbs-up,#f00,2)>> is identical to
<<FontAwesome(fa fa-thumbs-up fa-2x,#FF0000)>>
The Include macro <<Include(my.png)>> produces results identical to the transclusion {{my.png}}. It is more flexible than a transclusion because it supports multiple parameters and the first parameter may be any regrex starting with a ^. The include macro accepts 3 parameters where the second parameter is a heading and the third parameter a heading level between 1 and 6:
<<Include(^zi)>> embeds all wiki items starting with zi.
<<Include(moin.png,My Favorite icon, 6)>>
The ItemList macro accepts multiple named parameters: item, startswith, regex, ordered and display.
<<ItemList(item=”Foo”)>> lists subitems of Foo item
<<ItemList(ordered=’True’)>> displays ordered list of subitems, default is unordered
<<ItemList(startswith=”Foo”)>> lists subitems starting with Foo
<<ItemList(regex=”Foo$”)>> lists subitems ending with Foo
<<ItemList(tag=”template”)>> only include items with this tag
<<ItemList(skiptag=”template”)>> ignore items with this tag
<<ItemList(display=”FullPath”)>> default, displays full path to subitems
<<ItemList(display=”ChildPath”)>> displays last component of the FullPath, including the ‘/’
<<ItemList(display=”ChildName”)>> displays subitem name
<<ItemList(display=”UnCameled”)>> displays “fooBar” as “foo Bar”
The MonthCalendar macro accepts multiple named parameters: item, year, month, month_offset, fixed_height and anniversary.
<<MonthCalendar>> Calendar of current month for current page
<<MonthCalendar(month_offset=-1)>> Calendar of last month
<<MonthCalendar(month_offset=+1)>> Calendar of next month
<<MonthCalendar(item=”SampleUser”,month=12)>> Calendar of Page SampleUser, this year’s december
<<MonthCalendar(month=12)>> Calendar of current Page, this year’s december
<<MonthCalendar(year=2022,month=12)>> Calendar of December, 2022