Extension:SyntaxHighlightThemes

From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
SyntaxHighlightThemes
Release status: stable
Implementation User interface
Description Allows users to choose between various syntax highlighting themes
Author(s) Nathan Kuenzig (kuenzigntalk)
Latest version 1.0.0
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.35+
Database changes No
License MIT License
Download
README on GitHub

The SyntaxHighlightThemes extension allows users to choose between various syntax highlighting themes when using the SyntaxHighlight extension.

Usage[edit]

Once installed, users can change their syntax highlighting theme in their preferences under Appearance. All styles provided by Pygments are supported.

Installation[edit]

  • Download and place the file(s) in a directory called SyntaxHighlightThemes in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    wfLoadExtension( 'SyntaxHighlightThemes' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

$wgDefaultUserOptions['syntaxhighlight-theme']
The default theme used is the default style from Pygments. Use this option to change the default theme for your wiki
($wgDefaultUserOptions['syntaxhighlight-theme'] = 'monokai'; for example)

See also[edit]