Markdown pages

This wiki can store pages in Markdown as well as in the native MoinMoin wiki syntax. Both kinds of pages can be used side by side: they link to each other, they appear in searches, RecentChanges and backlinks, and they have history, diffs and attachments.

Writing a Markdown page

Just write the page in Markdown: MoinMoin reads the text and recognizes by itself whether a page is written in Markdown or in MoinMoin wiki markup (e.g. from # Title headings, **bold**, [text](link) links, lists starting at the beginning of the line, ``` code blocks). Existing wiki pages stay as they are.

If a page is too short or too plain to be recognized (it is then shown as wiki markup), put this line at the very top of the page (it is not shown):

#format markdown

or create the page from the MarkdownTemplate. A #format line always wins over the automatic recognition (#format moin forces MoinMoin wiki markup; the old #format wiki works too). The wiki administrator can turn the recognition off with markup_autodetect = False, and make Markdown the format of the pages without a #format line with default_markup = 'markdown'.

Lines like # Title and ## Section in a Markdown page are Markdown headings (the MoinMoin processing instructions, like #acl, have no blank after the #).

Text

Markdown Result
**bold** bold
*italic* italic
`code` code
~~~ / ``` blocks code blocks
> quote quotation
* item or 1. item lists
--- horizontal rule

Tables, footnotes1, definition lists and abbreviations are supported, too.

  • [[PageName]] and [[PageName|text]], like in wiki markup: FrontPage
  • [text](PageName): the front page
  • [text](/SubPage) and [text](../SisterPage): relative page names
  • [[PageName#anchor|text]]: a section of a page
  • [[MoinMoin:HelpOnMacros]]: interwiki links
  • [text](https://example.org) and <https://example.org>: external links

Link targets without a URL scheme are wiki pages. For security, only safe URL schemes (http, https, ftp, mailto, ...) are allowed.

Attachments and images

  • [[attachment:file.pdf|text]] or [text](attachment:file.pdf)
  • ![description](attachment:image.png) shows an attached image
  • ![description](https://example.org/image.png) shows an external image

Macros

MoinMoin macros work like in wiki markup, e.g. <<TableOfContents>>, <<RecentChanges>>, <<FullSearch(text)>> or <<Date(...)>>. Inside `code` they are not executed.

Code and other markups

A fenced block with a language name is highlighted:

   1 def hello(name):
   2     return "Hello, %s!" % name

A fenced block called wiki (or creole, rst, csv) is rendered with that markup, so you can use MoinMoin wiki syntax inside a Markdown page:

MoinMoin wiki markup, with a :-) smiley icon.

Not supported

Raw HTML is shown as text, it is not rendered (the wiki stays safe from scripts). The graphical editor only works for wiki markup pages, Markdown pages are edited with the text editor.


  1. Like this footnote. ↩