This is a general overview of how to convert the pages from a running MediaWiki instance to Massive Wiki pages. There are many variables involved in the process, and you may need to change these steps or add more; or, it might not work at all. These instructions are provided as a skeleton framework on which to build, and are offered in the hope that they're useful as a starting point to build from.
We use an open source tool which knows how to read a MediaWiki XML export file and write Markdown pages. Among other things, it uses Pandoc under the hood.
The tool we used was Mediawiki to GitHub Flavoured Markdown, which is based on MediaWiki to Markdown.
Consulting Help:Export - Wikipedia, we decided to use the first method documented there, Special:Export
, after collecting all the page names with Special:AllPages
. (If you're a Python developer, Pywikibot looks interesting too, but more involved.)
Special:AllPages
to the URL instead of a page name.Special:Export
to the URL instead of a page name.We ran the Dockerized version of Mediawiki to GitHub Flavoured Markdown.
Create a directory, change into the directory, and run the following command.
docker run -v $PWD:/app thawn/mediawiki-to-gfm --filename=YOUR_EXPORT.xml
The app will create a directory called output
and save the Markdown files there. It will take a few seconds for each page.
At this point, you are pretty close to having a Massive Wiki. Things to consider:
Main_Page.md
to README.md
, and put a note in Main_Page.md
that the MediaWiki has been converted to Markdown, and the new main page is now README.md
. Add the date of conversion, and your name and a way to contact you.[]()
rather than [[]]
. These will work, but you might want to convert them.[]()
internal links to HTML, .html
isn't added to the links. Depending on how you host the output HTML site, you may need to add .html
to each internal link. (This could be added to Massive Wiki Publisher as an option some day.)# My Page Title
). This can be ignored, or they can be added with some quick scripting, or Massive Wiki Publisher could have an option added some day to write title lines for files that don't have them.