Extension:SyntaxHighlightPages

The SyntaxHighlightPages extension highlights pages based on title suffixes; it depends on Extension:SyntaxHighlight.

Additionally the extension adds a Download link to the toolbox on highlighted pages.

Installation

 * Install Extension:SyntaxHighlight.

Configuration parameters

 * $wgSyntaxHighlightPagesSuffixes
 * The enabled suffixes.

For example:

$wgSyntaxHighlightPagesSuffixes = ['txt', 'html', 'css', 'xml', 'js', 'php'];

Note that the suffix needs to be a short name listed under https://pygments.org/docs/lexers/.

Unfortunately using the file extensions known to Pygments does not work since Extension:SyntaxHighlight provides no PHP wrapper for.

This does mean that adding e.g.  will not work because it is not a lexer name.