MediaWiki Extension SyntaxHighlight: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
<syntaxhighlight lang='php'>
<syntaxhighlight lang='php'>
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
</syntaxhighlight>
Set execute permissions for the pygmentize binary:
<syntaxhighlight lang='bash'>
chmod a+x /var/www/<mediawiki-dir>/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize
</syntaxhighlight>
</syntaxhighlight>

Revision as of 07:14, 7 December 2020

External

Internal

Installation

Download from https://www.mediawiki.org/wiki/Special:ExtensionDistributor/SyntaxHighlight_GeSHi

Expand in /var/www/<mediawiki-dir>/extensions:

tar -xzf SyntaxHighlight_GeSHi-REL1_35-6bd7a93.tar.gz -C /var/www/mediawiki-1.35.0/extensions

Add the following line at the bottom of LocalSettings.php

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

Set execute permissions for the pygmentize binary:

chmod a+x /var/www/<mediawiki-dir>/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize