Table of Contents
Markdown Page Plugin
Compatible with DokuWiki
- 2023-04-04 "Jack Jackrum" no
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" yes
- 2018-04-22 "Greebo" yes
Similar to commonmark, markdowku, markdownextra
This plugin is abandoned! New maintainers welcome.
Installation
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.
Examples/Usage
A simple block:
<markdown> # Header simple paragraph: *emph* **strong** `mono`. > quote [link](https://www.dokuwiki.org) </markdown>
Configuration and Settings
name | description |
---|---|
flavor | Markdown Flavor |
markdown_default | You can use plain Markdown to write all pages without any special words by this option. |
Syntax
Basic syntax:
<markdown>some markdown text</markdown>
This plugin supports three flavors:
- GitHub Flavored Markdown: https://github.github.com/gfm/
- Markdown Extra: https://michelf.ca/projects/php-markdown/extra/
- Traditional Markdown: https://daringfireball.net/projects/markdown/syntax
This plugin supports internal links:
<markdown> [internal link](:start) [interwiki link](doku>plugin:mdpage)  </markdown>
Markdown Defaulting (Experimental)
If you enable markdown_default
, you often use Markdown syntax without any tags.
However, need a tag if you want to use DokuWiki syntax in Markdown as follows:
<!DOCTYPE markdown> # Header any Markdown contents: **Bold Text**, `Inline Code` <script type="text/x-dokuwiki"> any DokuWiki content: **Bold Text**, <del>Strike-through Text</del>, ''Inline Code'' </script> any Markdown contents: **Bold Text**, `Inline Code`
FAQ
Development
See README on GitHub
Change Log
Full releases: https://github.com/mizunashi-mana/dokuwiki-plugin-mdpage/releases
- Release v2.2.0 (2021-01-09 08:47)Support links with titles: Fix #35
- Release v2.1.0 (2020-12-20 09:53)More support markdown defaulting: Support #71
- Release v2.0.0 (2020-09-13 19:33)Add Markdown defaulting switch (experimental feature). Support #66 Fix #64
- Release v1.1.3 (2020-09-13 08:56)Update dependencies for Hogfather
- Release v1.1.2 (2020-06-14 06:02)Include ctype polyfills. Fix #57
Known Issues and Wishes
When you find a bug or want any features and it is not appeared on this section, please make a new issue.
- DW-Hogfather: Call to undefined method Doku_Renderer_metadata::html()After Upgrading DW to Version "Hogfather" some pages throw an error... other ones work like expected: And attached txt-file is the content of a page, that don't render as expected: broken_md.txt Content of the DW-Logs: /public_html/lib/plugins/mdpage/src/DokuWiki/Plugin/Mdpage/MarkdownRendererTrait.php(156) #0 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/vendor/cebe/markdown/Parser.php(203): DokuWiki\Plugin\Mdpage\Markdown\GitHubFlavored->renderInlineHtml() #1 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/src/DokuWiki/Plugin/Mdpage/MarkdownRendererTrait.php(58): cebe\markdown\Parser->renderAbsy() #2 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/vendor/cebe/markdown/Parser.php(203): DokuWiki\Plugin\Mdpage\Markdown\GitHubFlavored->renderParagraph() #3 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/src/DokuWiki/Plugin/Mdpage/MarkdownRendererTrait.php(200): cebe\markdown\Parser->renderAbsy() #4 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/vendor/cebe/markdown/Parser.php(203): DokuWiki\Plugin\Mdpage\Markdown\GitHubFlavored->renderQuote() #5 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/vendor/cebe/markdown/Parser.php(61): cebe\markdown\Parser->renderAbsy() #6 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/src/DokuWiki/Plugin/Mdpage/MarkdownRendererTrait.php(24): cebe\markdown\Parser->parse() #7 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/src/DokuWiki/Plugin/Mdpage/Markdown.php(28): DokuWiki\Plugin\Mdpage\Markdown\GitHubFlavored->parseOnce() #8 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/syntax.php(117): DokuWiki\Plugin\Mdpage\Markdown::parseWithRenderer() #9 /home/xxxxx/domains/wiki.xxxxx.com/public_html/lib/plugins/mdpage/syntax.php(93): syntax_plugin_mdpage->renderWithRenderer() #10 /home/xxxxx/domains/wiki.xxxxx.com/public_html/inc/parser/renderer.php(119): syntax_plugin_mdpage->render() #11 /home/xxxxx/domains/wiki.xxxxx.com/public_html/inc/parserutils.php(540): Doku_Renderer->plugin() #12 /home/xxxxx/domains/wiki.xxxxx.com/public_html/inc/parserutils.php(299): p_render_metadata() #13 /home/xxxxx/domains/wiki.xxxxx.com/public_html/inc/common.php(266): p_get_metadata() #14 /home/xxxxx/domains/wiki.xxxxx.com/public_html/doku.php(97): pageinfo() #15 {main} I've searched in the doku-wiki sources and found, that those functions are removed: You also can see it if you compare the sources at github: I've fixed it by commenting out the code in the both blocks, that handle html in md-plugin: protected function renderHtml($block) { /* $content = $block['content']."\n"; if ($this->isCommentOnlyXMLString($content)) { return ''; } global $conf; if ($this->isGeshiFallbackVersion() && !$conf['htmlok']) { $this->renderer->monospace_open(); $this->renderer->cdata($content); $this->renderer->monospace_close(); } else { $this->renderer->htmlblock($content); } */ return $this->getRenderResult(); } protected function renderInlineHtml($block) { /* $content = $block[1]; if ($this->isCommentOnlyXMLString($content)) { return ''; } global $conf; if ($this->isGeshiFallbackVersion() && !$conf['htmlok']) { $this->renderer->monospace_open(); $this->renderer->cdata($content); $this->renderer->monospace_close(); } else { $this->renderer->html($content); } */ return $this->getRenderResult(); }
- Incompatibility with Emoji pluginThis is a bug report. Name Value dokuWiki version 2020-07-29 "Hogfather" OS Docker image linuxserver/dokuwiki on Oracle Linux Host Expect behavior: The Emoji plugin and mdpage don't seem to play well together. Not sure wether this is an Emoji issue or an mdpage issue though. Any Emoji inserted within the tags such as <markdown> :warning: </markdown> will display the litteral text instead of the emoji Actual behavior: Litteral text is displayed instead of the emoji icon Details:
- checkboxes are not renderedThis is a bug report. Disclaimer: I think this is a bug report. But there is the possibility, that this feature is not supposed to work anyway. I just don't know. If this feature is not supposed to work, then I will create a feature wish out of it Name Value DokuWiki Version Release 2020-07-29 "Hogfather" PHP Version 7.4.20 OS CentOS 7.9.2009 Web Server Apache 2.4.6 Markdown Page Plugin 2021-01-09 Expect behavior: The following markup code: ====== mdpage plugin test ====== <markdown> # title is working, but - [ ] checkboxes - [ ] not, no * [ ] matter how * [ ] I write - [ ] them - [x] ;-) </markdown> is expected to render as checkboxes as shown here (same MarkDown code as rendered in GitLab): Actual behavior: Checkboxes are not shown: Details: The MarkDown mode is set to github-flavored
- Wrong installAfter install plugin on work wiki - my wiki dont work and say Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.1.0".
- markdown-extra flavor not fully supported?Hi!, it seems that markdown-extra is not fully supported. Specifically, the footnotes feature doesn't work (https://michelf.ca/projects/php-markdown/extra/#footnotes). It would be possible to fix this? Thanks!
- Editing a section edits the entire page, but cuts off the last 2 characters.This is a bug report. Name Value DokuWiki Version 2020-07-29 "Hogfather" PHP Version 7.4.6 OS Darwin Web Server Apache/2.4.46 (Unix) PHP/7.4.6 Details: The "edit" button next to each header doesn't seem to respect markdown sections properly. If I click on one in a markdown block, it starts editing the entire page, but it cuts off the last 2 characters. In my case, this usually breaks the </markdown> tag by replacing it with </markdow, but it's always just the last two characters.
- mdpage plugin doesn't work with farmsThis is a bug report. Name Value DokuWiki Version Release 2020-07-29 "Hogfather" PHP Version PHP Version 7.3.5 OS Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux Web Server Apache/2.4.25 (Debian) Details: When installing the mdpage plugin in a Dokuwiki farm, Dokuwiki becomes inoperable because the condition below doesn't meet, even though the file exists, there should be another way to validate it in a farm environment. https://github.com/mizunashi-mana/dokuwiki-plugin-mdpage/blob/8d8ade76b71acfced603580f7ad4cbe9c76d5e08/src/bootstrap.php#L7-L10 Farm directory structure: The error I got is: I'm not sure if the src/bootstrap.php is required at all within this plugin, the function includeIfExists isn't being called outside this file.
- Incorrect style nesting on headingsThis is a bug report. Name Value DokuWiki Version Release 2018-04-22b "Greebo" PHP Version 7.3.10 OS Linux Web Server Apache/2.4.41 (Unix) OpenSSL/1.1.0l PHP/7.3.10 Docker image bitnami/dokuwiki Details: Given the following simple page code: <markdown> # This `is` a `test` This is text </markdown> Instead of the expected heading: This is a test It renders: This a Thanks!