Jump to content

Syntax Highlighting: Difference between revisions

From Bonfire Star Wiki
Phidao (talk | contribs)
Created page with "== Introduction == SyntaxHightlight_GeSHi<ref>[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]</ref> allows for a means of adding color to code text. == Enabling == Enable by adding this to LocalSettings.php. <syntaxhighlight lang=bash> wfLoadExtension( 'SyntaxHighlight_GeSHi' ); </syntaxhighlight> == Example markup == <pre> <syntaxhighlight lang=bash> wfLoadExtension( 'SyntaxHighlight_GeSHi' ); </syntaxhighlight> </pre> == Some availabl..."
 
Phidao (talk | contribs)
 
Line 28: Line 28:
* JavaScript: js
* JavaScript: js
* MySQL: mysql
* MySQL: mysql
== References ==
<references />
== See Also ==
* [[MediaWiki]]

Latest revision as of 21:18, 23 November 2025

Introduction

SyntaxHightlight_GeSHi[1] allows for a means of adding color to code text.

Enabling

Enable by adding this to LocalSettings.php.

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

Example markup

<syntaxhighlight lang=bash>
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
</syntaxhighlight>

Some available languages

Some of the languages that use often [2]:

  • Bash: bash
  • C#: cs
  • HTML: html
  • JavaScript: js
  • MySQL: mysql

References

See Also