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
?>

4 comments:

  1. Pretty great post. I just stumbled upon your blog and wanted to
    say that I've really loved browsing your weblog posts. After all I will be subscribing
    to your feed and I hope you write again very soon!

    ReplyDelete