Extension:Highlightjs Integration

This extension is a drop-in replacement for the SyntaxHighlight extension. Instead of using Pygments as server-side highlighter, it uses highlight.js a client-side JavaScript highlighter. It makes faster the wikis which use a lot of syntax highlight.

Usage
Once installed, you can use the "syntaxhighlight" or the "source" tags on wiki pages. For example,

lang
If no "lang" attribute is defined, the highlight.js library tries itself to determine the language.

The  attribute defines what lexer should be used. This affects how the extension highlights the source code. The highlight.js library supports 168 languages. Specifying an invalid or unknown name will make the highlight.js library unable to highlight the source code.

inline
The attribute indicates that the source code should be inline as part of a paragraph (as opposed to being its own block). For example: An extract of source  on one line.

Style
The highlight.js library supports 77 styles.

To change the style edit the file  and modify the line

Tags
By default you can use the "syntaxhighlight" or the "source" tags to highlight source code.

To add other tags or remove some, edit the file  and modify the following block:

Mapping between languages
If you used SyntaxHighlight, you will find some languages have different names in the highlight.js library and some have missing.

To map a language name to an existing language in the highlight.js library, edit the file  and modify the following block:

highlight.js
This extension is bundled with highlight.js version 0.9.8 and the following languages:

Common languages: Other languages: If you want a different version of the highlight.js library or to add or remove languages:
 * Apache
 * Bash
 * C#
 * C++
 * CSS
 * Diff
 * HTML, XML
 * HTTP
 * Ini
 * JSON
 * Java
 * JavaScript
 * Makefile
 * Markdown
 * Nginx
 * PHP
 * Perl
 * Python
 * Ruby
 * SQL
 * Access log
 * AutoHotkey
 * DNS Zone file
 * DOS .bat
 * Django
 * Excel
 * Less
 * PowerShell
 * TeX
 * VBScript
 * YAML
 * 1) go on the download page of the highlight.js website and download a custom package.
 * 2) remove or rename the   folder.
 * 3) unarchive the custom package in  . You should have a fresh new   folder.