This post was initially published on September 1, 2015.

Our project team uses MediaWiki to capture and share knowledge among team members. While I like MediaWiki in general, I never liked its syntax enough to learn it well.

Instead, I often find myself writing an entire article in Markdown syntax without realizing the article is nearly complete. The article does not appear as I intended in MediaWiki and I end up wasting time fixing incorrect syntaxes.

Rather than I actually learn MediaWiki syntax, I wanted to know if it is possible to write an article in Markdown syntax and automatically convert it in MediaWiki syntax. After a quick search, I found out that Pandoc is exactly what I needed.

Installation is very easy on all major platforms (Linux, macOS and Windows). On macOS, it takes a very long time to build ghc if you are installing Pandoc via Homebrew. You may need to give yourself a few hours.

Once the installation is complete, you can convert your Markdown file to MediaWiki format like this:

pandoc -f markdown -t mediawiki -o

This is enough to make me happy to capture and share knowledge for the time being. It is also possible to generate Microsoft Word file from Markdown. Pandoc might make documentation work tolerable enough, if I can use Markdown.