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 edit summary |
||
| Line 1: | Line 1: | ||
Use the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi | Use the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi SyntaxHighlight GeSHi extension]. | ||
Download and copy SyntaxHighlight GeSHi extension into the MediaWiki extensions folder. | Download and copy SyntaxHighlight GeSHi extension into the MediaWiki extensions folder. | ||
| Line 19: | Line 19: | ||
CSS | 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 [[http://www.mediawiki.org/wiki/Extension_talk:Syntax_Highlighting | 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 [[http://www.mediawiki.org/wiki/Extension_talk:Syntax_Highlighting Syntax Highlighting Discussion]] | ||
[[Category:Wiki_Customization]] | [[Category:Wiki_Customization]] | ||
Revision as of 18:20, 24 February 2012
Use the SyntaxHighlight 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 [Syntax Highlighting Discussion]