Wiki Syntax Highlighting

From Littledamien Wiki
Revision as of 03:58, 7 February 2012 by Video8 (talk | contribs) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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]