Wiki Syntax Highlighting: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Use the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi|SyntaxHighlight GeSHi extension]. Download and copy SyntaxHighlight GeSHi extension into the MediaWiki ...") |
(No difference)
|
Revision as of 03:58, 7 February 2012
Use the GeSHi extension.
Download and copy SyntaxHighlight GeSHi extension into the MediaWiki extensions folder.
Customization of the MediaWiki LocalSettings.php file:
$wgAllowUserJs = true;
$wgAllowUserCss = true;
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
Basic usage:
<syntaxhighlight lang="specifyLanguageHere"> your code. (closing syntaxhighlight tag)
CSS
From within the wiki search for "MediaWiki:Custom.css" or "MediaWiki:Geshi.css" or "MediaWiki:Monobook.css". This will load up the CSS page, which can then be edited to tweak the formatting of the code. More info at [Highlighting Discussion]