MediaWiki: Formating and colouring Code
MediaWiki is the wiki software behind WikiPedia.
The issue, when using it as a software development tool, is formatting code in a pretty way.
As we did with WordPress before, here are some details to make dp.SyntaxHighlighter work fairly seamlessly with MediaWiki.
Install the client-side highlighter
Download dp.SyntaxHighlighter.
Uncompress its content under a new /skins/common/SyntaxHighlighter
folder in your MediaWiki installation (don’t forget to make sure the files can be read by the web server; for instance, on Linux you may use chown apache.apache -R *
).
In the skin template you are using for your MediaWiki site, insert the necessary code as required. In my example, I use the default /skins/MonoBook.php
template into which I added the following:
Just before the closing </head>
tag:
Just before the closing