Extension:Code

A MediaWiki extension that builds on to provide the following (all in a configurable manner):


 * shorter tags
 * e.g.  instead of


 * code actions
 * e.g. automatically link the WDQS for SPARQL code blocks


 * code pages
 * e.g. automatically higlight pages with names ending in  as SPARQL (and also display the code actions for them)


 * customizable code display via Lua/
 * e.g. automatically link Wikidata identifiers in code blocks

Note that code actions are also linkable from other pages via the special page, e.g. attempts to execute the   action for the   code page and redirect the user accordingly.

Customizable code display
The display of code blocks can be customized via Lua/. For example if you specify e.g.  for a language then this extension will additionally invoke the  Scribunto module for every code tag and code page. Such a module could look as follows:

Note that the returned strings are not parsed as Wikitext they must already be HTML; any dangerous tags and attributes are removed via MediaWiki's builtin class.

Installation
Visit  it will tell you what other configuration you need.

(If you want syntax highlighting via, additionally add  to your  ).