Search This Blog

Wednesday, May 8, 2013

MediaWiki add GeSHi Extension

I became a fun of GeSHi.

Extension:SyntaxHighlight GeSHi tag displays formatted source code with the tag.


cd /var/www/html/wikidocs/extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SyntaxHighlight_GeSHi.git


vi LocalSettings.php

require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");


# service httpd restart

On the wiki page, you can now use "syntaxhighlight" elements:



$v = "string"; // sample initialization
?>
html text
echo $v; // end of php code
?>

3 comments: