This extension allows usage of Markdown syntax on wiki pages. It's based on extension of the Cebe's Markdown library for parsing Mrkdown into WikiText syntax.
I have many markdown files that used to be source for our personal web in the past. But the provider is gone and I had many files on my disk with some not well known dialect of Markdown inside.
There is Blake's Markdown. It's not working ion the version of MediaWiki I have and fixing it turns into this project. To be more flexible in parsing I swhitched backend library to Cebe's Markdown parser. As well I inject some wiki syntax into the files and change the logic of the parsing.
Now it's possilbe to combine the Markkdown language with wiki syntax.
To simplify the extension I extracted MarkdownWiki parser to separated project.
- In
$mw
runCOMPOSER=composer.local.json composer require --no-update paveld/mw-markdown-wiki
, where$mw
is a path to your MediaWiki installation - In
$mw
runcomposer update paveld/mw-markdown-wiki --no-dev -o
- Add the following to
$mw/LocalSettings.php
:
wfLoadExtension( 'MarkdownWiki' );
Set MarkdwonWiki as default paser add to the file as well following code:
$wgMarkdownWikiDefaultOn = true;
To alow markdown syntax in the article put {{MARKDOWN}}
tp the begging of the page.
To use Markdown on every page use $wgMarkdownWikiDefaultOn
in $mw/LocalSettings.php
See README.md on the MarkdownWiki project page.