Code Highlight: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Module) |
||
Line 3: | Line 3: | ||
[[Category:Extension]] | [[Category:Extension]] | ||
== Module == | == Module == | ||
Download module at | Download module at [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi_GeSHi SyntaxHighlight_GeSHi] | ||
<pre>tar -xzf SyntaxHighlight_GeSHi-REL1_23-4959271.tar.gz -C /var/www/mediawiki/extensions</pre> | <pre>tar -xzf SyntaxHighlight_GeSHi-REL1_23-4959271.tar.gz -C /var/www/mediawiki/extensions</pre> | ||
== Setup == | == Setup == | ||
Copy file into extensions folder | Copy file into extensions folder |
Revision as of 17:08, 15 November 2014
Module
Download module at SyntaxHighlight_GeSHi
tar -xzf SyntaxHighlight_GeSHi-REL1_23-4959271.tar.gz -C /var/www/mediawiki/extensions
Setup
Copy file into extensions folder Add the following code at the end of LocalSettings.php
require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"; $wgSyntaxHighlightDefaultLang = "php";
Sample code
Result
Supported Languages
These are the languages known by GeSHi that can be used in the lang parameter.
Note that installed GeSHi version (can be revealed by previewing e.g. <syntaxhighlight lang="-"></syntaxhighlight>
) might not be the most recent version; see bugzilla:10967 for Wikimedia sites.
The GeSHi sources for each language can be found in VCS on SourceForge. Remember to go and select the version that the MediaWiki installation uses.