Table of Contents
DokuWiki Commonmark Plugin
Compatible with DokuWiki
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" yes
- 2018-04-22 "Greebo" unknown
- 2017-02-19 "Frusterick Manners" unknown
Similar to markdowku, markdownextra, mdpage
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
This is an another plugin that tries to implement Commonmark syntax to DokuWiki ecosystem. Unlike others, this plugin takes different approach for the goal:
- the plugin will find whether the Markdown doctype indicator (
<!DOCTYPE markdown>) is included in document
- if found, the document will be passed to Commonmark-to-DokuWiki renderer before main DW parser; all the markups compatible to markdown must be parsed
- after pre-render, the resultant DokuWiki document will be passed into DW parser; all the remaining process should be processed as usual
This plugin can process all the basic Commonmark syntax, plus footnote / table / strikethrough markup.
Configuration and Settings
Currently, there is no adjustable settings here.
- version 1.2.1 (2022-10-08 09:32)fix hr rendering error after list (#16) fix indented code block rendering issues (thanks to email@example.com)
- version 1.2.0 (2022-04-14 05:03)Add force_commonmark option (#10, #11)
- version 1.1.0 (2022-02-01 10:18)Add toolbar for Commonmark. Fix footnote (#7) and inline code rendering issues (#8).
- version 1.0.0 (2021-07-19 18:10)Add table syntax. First full-working extension.
- v0.3.0 (2021-07-12 14:35)fix credit & typo
Known Bugs and Issues
For bugs, discussions, and feature requests, please open new here.
- Add toolbar button for Markdown syntax
- Config for footnote style (e.g. refnotes)
Why another Markdown plugin?
There is no DokuWiki extension that accepts Markdown syntax with complete compatibility. Also, the way DokuWiki parser works, i.e. token-based process, cannot fit the Markdown syntax (e.g. footnote and nested lists). This plugin is based on the assumption that every Commonmark document can be converted to DokuWiki markup without any issue, while its reversal is not guaranteed.
There is no way for store DW documents with other extension rather than .txt, due to its core policy. You may modify the local code, it you want to.
Due to the concept that adding pre-render procedure for Commonmark-to-DW conversion, this plugin would have additional computational cost. However, I think DokuWiki and PHP Commonmark parser is sufficiently fast; it will add a little bit of additional process time.
This plugin aims for complete compatibility of Markdown in DokuWiki. Most Markdown syntax have corresponding DW syntax, so it will work without problem; but in some cases, Markdown syntax do not matches DW specification one-by-one, or vice versa. Here is a list of known ambiguities between Commonmark and DokuWiki, and its implements in the plugin:
- Raw HTML blocks are ignored because DW does not parse raw HTML without the
htmlis used for a code fence it will be converted to dokuwiki's <HTML> block and rendered as HTML.
dokuwikibehave in a similar fashion respectively.
```dokuwiki **this text** will be rendered as //dokuwiki// **not** //markdown//. ```