{"id":25866414,"url":"https://github.com/artemklevtsov/mediawiki-syntaxhighlight","last_synced_at":"2026-06-23T12:02:08.047Z","repository":{"id":14313356,"uuid":"17022333","full_name":"artemklevtsov/MediaWiki-SyntaxHighlight","owner":"artemklevtsov","description":"This MediaWiki extension adds syntaxhighlight tag that is implemented using highlight.js library.","archived":false,"fork":false,"pushed_at":"2014-12-27T19:25:56.000Z","size":788,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T00:04:24.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artemklevtsov.png","metadata":{"files":{"readme":"README.mediawiki","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-20T14:10:03.000Z","updated_at":"2022-05-16T10:56:30.000Z","dependencies_parsed_at":"2022-09-18T10:41:01.892Z","dependency_job_id":null,"html_url":"https://github.com/artemklevtsov/MediaWiki-SyntaxHighlight","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/artemklevtsov/MediaWiki-SyntaxHighlight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemklevtsov%2FMediaWiki-SyntaxHighlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemklevtsov%2FMediaWiki-SyntaxHighlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemklevtsov%2FMediaWiki-SyntaxHighlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemklevtsov%2FMediaWiki-SyntaxHighlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artemklevtsov","download_url":"https://codeload.github.com/artemklevtsov/MediaWiki-SyntaxHighlight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemklevtsov%2FMediaWiki-SyntaxHighlight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-02T02:33:59.374Z","updated_at":"2026-06-23T12:02:08.030Z","avatar_url":"https://github.com/artemklevtsov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"= MediaWiki-SyntaxHighlight =\n\nThis MediaWiki extension adds '''syntaxhighlight''' tag that is implemented using\n[http://highlightjs.org highlight.js] library.\n\n== Requirements ==\n\n* MediaWiki 1.17 or above.\n\n== Installation ==\n\n=== Step 1: Downloading ===\n\nYou can download the snapshot [https://github.com/unikum/MediaWiki-SyntaxHighlight/archive/master.zip zip file] and extract the files to your \u003ccode\u003eextensions\u003c/code\u003e directory. For example using wget and unzip tools:\n\n\u003cpre\u003e\ncd /tmp\nwget https://github.com/unikum/MediaWiki-SyntaxHighlight/archive/master.zip\nunzip master.zip -d $WIKIROOT/extensions/SyntaxHighlight\n\u003c/pre\u003e\n\nThis extention already include latest version of the highlight.js library which include all supported languages. You can also download highlight.js library with soppurt only a needed languages from [http://highlightjs.org/download/ this page]. Check a needed languages and press \"Download\" button. Then extract \u003ccode\u003ehighlight.zip\u003c/code\u003e to \u003ccode\u003eSyntaxHighlight/highlight.js\u003c/code\u003e directory.\n\n\n=== Step 2: Installation ===\n\nAdd this line to the end of your [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php]:\n\n\u003cpre\u003e\nrequire_once \"$IP/extensions/SyntaxHighlight/SyntaxHighlight.php\";\n\u003c/pre\u003e\n\nInstallation can now be verified through \u003ccode\u003eSpecial:Version\u003c/code\u003e page on your wiki.\n\n== Configuration ==\n\nYou can specify highlight style by \u003ccode\u003e$wgSyntaxHighlightStyle\u003c/code\u003e in your [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php]:\n\n\u003cpre\u003e\n$wgSyntaxHighlightStyle = 'xcode';\nrequire_once \"$IP/extensions/SyntaxHighlight/SyntaxHighlight.php\";\n\u003c/pre\u003e\n\nYou should put this line '''before''' \u003ccode\u003erequire_once\u003c/code\u003e line.\n\nBy default highlight.js buileded for support only a common languages: Apache, Bash, C++, C#, CoffeeScript, CSS, Diff, HTTP, Ini file, Java, JavaScript, JSON, Markdown, Makefile, Nginx, ObjectiveC, Perl, PHP, Python, Ruby, SQL, XML.\n\nIf you want use an additional languages you should specify it with \u003ccode\u003e$wgSyntaxHighlightAdditionalLanguages\u003c/code\u003e option.\n\n\u003cpre\u003e\n$wgSyntaxHighlightAdditionalLanguages = array('lua', 'r', 'tex');\nrequire_once \"$IP/extensions/SyntaxHighlight/SyntaxHighlight.php\";\n\u003c/pre\u003e\n\nYou should put this line '''before''' \u003ccode\u003erequire_once\u003c/code\u003e line.\n\n== Usage ==\n\nOn the wiki page, you can now use \"syntaxhighlight\" elements:\n\n\u003cpre\u003e\u003cnowiki\u003e\n\u003csyntaxhighlight lang=\"php\"\u003e\n\u003c?php\n    $v = \"string\";    // sample initialization\n?\u003e\nhtml text\n\u003c?\n    echo $v;         // end of php code\n?\u003e\n\u003c/syntaxhighlight\u003e\n\u003c/nowiki\u003e\u003c/pre\u003e\n\nYou can specify language by \u003ccode\u003elang=\"\"\u003c/code\u003e parameter. If \u003ccode\u003elang\u003c/code\u003e parameter isn't defined language will be detected automaticy.\n\n== Supported languages ==\n\nThese are the languages that can be used in the '''lang''' parameter.\n\n{| class=\"wikitable\"\n! Code\n! Language\n|-\n| \u003ccode\u003e1c\u003c/code\u003e || 1C\n|-\n| \u003ccode\u003eactionscript\u003c/code\u003e || ActionScript\n|-\n| \u003ccode\u003eapache\u003c/code\u003e || Apache\n|-\n| \u003ccode\u003eapplescript\u003c/code\u003e || AppleScript\n|-\n| \u003ccode\u003easciidoc\u003c/code\u003e || AsciiDoc\n|-\n| \u003ccode\u003eautohotkey\u003c/code\u003e || AutoHotkey\n|-\n| \u003ccode\u003eavrasm\u003c/code\u003e || AVR Assembler\n|-\n| \u003ccode\u003eaxapta\u003c/code\u003e || Axapta\n|-\n| \u003ccode\u003ebash\u003c/code\u003e || Bash\n|-\n| \u003ccode\u003ebrainfuck\u003c/code\u003e || Brainfuck\n|-\n| \u003ccode\u003eclojure\u003c/code\u003e || Clojure\n|-\n| \u003ccode\u003ecmake\u003c/code\u003e || CMake\n|-\n| \u003ccode\u003ecoffeescript\u003c/code\u003e || CoffeeScript\n|-\n| \u003ccode\u003ecpp\u003c/code\u003e || C++\n|-\n| \u003ccode\u003ecs\u003c/code\u003e ||     C#\n|-\n| \u003ccode\u003ecss\u003c/code\u003e || CSS\n|-\n| \u003ccode\u003edelphi\u003c/code\u003e || Delphi\n|-\n| \u003ccode\u003ediff\u003c/code\u003e || Diff\n|-\n| \u003ccode\u003edjango\u003c/code\u003e || Django\n|-\n| \u003ccode\u003ed\u003c/code\u003e || D\n|-\n| \u003ccode\u003edos\u003c/code\u003e || DOS .bat\n|-\n| \u003ccode\u003eelixir\u003c/code\u003e || Elixir\n|-\n| \u003ccode\u003eerlang\u003c/code\u003e || Erlang\n|-\n| \u003ccode\u003eerlang-repl\u003c/code\u003e || Erlang REPL\n|-\n| \u003ccode\u003efix\u003c/code\u003e || FIX\n|-\n| \u003ccode\u003efsharp\u003c/code\u003e || F#\n|-\n| \u003ccode\u003eglsl\u003c/code\u003e || GLSL\n|-\n| \u003ccode\u003ego\u003c/code\u003e || Go\n|-\n| \u003ccode\u003ehaml\u003c/code\u003e || Haml\n|-\n| \u003ccode\u003ehandlebars\u003c/code\u003e || Handlebars\n|-\n| \u003ccode\u003ehaskell\u003c/code\u003e || Haskell\n|-\n| \u003ccode\u003ehttp\u003c/code\u003e || HTTP\n|-\n| \u003ccode\u003eini\u003c/code\u003e || Ini\n|-\n| \u003ccode\u003ejava\u003c/code\u003e || Java\n|-\n| \u003ccode\u003ejavascript\u003c/code\u003e || JavaScript\n|-\n| \u003ccode\u003ejson\u003c/code\u003e || JSON\n|-\n| \u003ccode\u003elasso\u003c/code\u003e || Lasso\n|-\n| \u003ccode\u003elisp\u003c/code\u003e || Lisp\n|-\n| \u003ccode\u003elivecodeserver\u003c/code\u003e || LiveCode server and revIgniter\n|-\n| \u003ccode\u003elua\u003c/code\u003e || Lua\n|-\n| \u003ccode\u003emakefile\u003c/code\u003e || Makefile\n|-\n| \u003ccode\u003emarkdown\u003c/code\u003e || Markdown\n|-\n| \u003ccode\u003emathematica\u003c/code\u003e || Mathematica\n|-\n| \u003ccode\u003ematlab\u003c/code\u003e || Matlab\n|-\n| \u003ccode\u003emel\u003c/code\u003e || MEL\n|-\n| \u003ccode\u003emizar\u003c/code\u003e || Mizar\n|-\n| \u003ccode\u003enginx\u003c/code\u003e || Nginx\n|-\n| \u003ccode\u003enix\u003c/code\u003e || Nix\n|-\n| \u003ccode\u003ensis\u003c/code\u003e || NSIS\n|-\n| \u003ccode\u003eobjectivec\u003c/code\u003e || Objective C\n|-\n| \u003ccode\u003eocaml\u003c/code\u003e || OCaml\n|-\n| \u003ccode\u003eoxygene\u003c/code\u003e || Oxygene\n|-\n| \u003ccode\u003eparser3\u003c/code\u003e || Parser3\n|-\n| \u003ccode\u003eperl\u003c/code\u003e || Perl\n|-\n| \u003ccode\u003ephp\u003c/code\u003e || PHP\n|-\n| \u003ccode\u003eprofile\u003c/code\u003e || Python profile\n|-\n| \u003ccode\u003eprotobuf\u003c/code\u003e || Protocol Buffers\n|-\n| \u003ccode\u003epython\u003c/code\u003e || Python\n|-\n| \u003ccode\u003erib\u003c/code\u003e || RenderMan RIB\n|-\n| \u003ccode\u003er\u003c/code\u003e || R\n|-\n| \u003ccode\u003ersl\u003c/code\u003e || RenderMan RSL\n|-\n| \u003ccode\u003eruby\u003c/code\u003e || Ruby\n|-\n| \u003ccode\u003eruleslanguage\u003c/code\u003e || Oracle Rules Language\n|-\n| \u003ccode\u003erust\u003c/code\u003e || Rust\n|-\n| \u003ccode\u003escala\u003c/code\u003e || Scala\n|-\n| \u003ccode\u003escilab\u003c/code\u003e || Scilab\n|-\n| \u003ccode\u003escss\u003c/code\u003e || SCSS\n|-\n| \u003ccode\u003esmalltalk\u003c/code\u003e || Smalltalk\n|-\n| \u003ccode\u003esql\u003c/code\u003e || SQL\n|-\n| \u003ccode\u003etex\u003c/code\u003e || TeX\n|-\n| \u003ccode\u003evala\u003c/code\u003e || Vala\n|-\n| \u003ccode\u003evbnet\u003c/code\u003e || VB.NET\n|-\n| \u003ccode\u003evbscript\u003c/code\u003e || VBScript\n|-\n| \u003ccode\u003evhdl\u003c/code\u003e || VHDL\n|-\n| \u003ccode\u003evim\u003c/code\u003e || Vim Script\n|-\n| \u003ccode\u003ex86asm\u003c/code\u003e || Intel x86 Assembly\n|-\n| \u003ccode\u003exml\u003c/code\u003e || HTML, XML\n|}\n\n== Theme Styles ==\n\nThese are the styles that can be used in the '''$wgSyntaxHighlightStyle''' extention parameter.\n\nYou can show this styles on [http://highlightjs.org/static/test.html live demo page].\n\n{| class=\"wikitable\"\n! Code\n! Style Name\n|-\n| \u003ccode\u003edefault\u003c/code\u003e || Default\n|-\n| \u003ccode\u003edark\u003c/code\u003e || Dark\n|-\n| \u003ccode\u003efar\u003c/code\u003e || FAR\n|-\n| \u003ccode\u003eidea\u003c/code\u003e || IDEA\n|-\n| \u003ccode\u003esunburst\u003c/code\u003e || Sunburst\n|-\n| \u003ccode\u003ezenburn\u003c/code\u003e || Zenburn\n|-\n| \u003ccode\u003evs\u003c/code\u003e || Visual Studio\n|-\n| \u003ccode\u003eascetic\u003c/code\u003e || Ascetic\n|-\n| \u003ccode\u003emagula\u003c/code\u003e || Magula\n|-\n| \u003ccode\u003egithub\u003c/code\u003e || GitHub\n|-\n| \u003ccode\u003egooglecode\u003c/code\u003e || Google Code\n|-\n| \u003ccode\u003ebrown_paper\u003c/code\u003e || Brown Paper\n|-\n| \u003ccode\u003eschool_book\u003c/code\u003e || School Book\n|-\n| \u003ccode\u003eir_black\u003c/code\u003e || IR Black\n|-\n| \u003ccode\u003esolarized_dark\u003c/code\u003e || Solarized - Dark\n|-\n| \u003ccode\u003esolarized_light\u003c/code\u003e || Solarized - Light\n|-\n| \u003ccode\u003earta\u003c/code\u003e || Arta\n|-\n| \u003ccode\u003emonokai\u003c/code\u003e || Monokai\n|-\n| \u003ccode\u003emonokai_sublime\u003c/code\u003e || Monokai Sublime\n|-\n| \u003ccode\u003excode\u003c/code\u003e || XCode\n|-\n| \u003ccode\u003epojoaque\u003c/code\u003e || Pojoaque\n|-\n| \u003ccode\u003erainbow\u003c/code\u003e || Rainbow\n|-\n| \u003ccode\u003etomorrow\u003c/code\u003e || Tomorrow\n|-\n| \u003ccode\u003etomorrow-night\u003c/code\u003e || Tomorrow Night\n|-\n| \u003ccode\u003etomorrow-night-bright\u003c/code\u003e || Tomorrow Night Bright\n|-\n| \u003ccode\u003etomorrow-night-blue\u003c/code\u003e || Tomorrow Night Blue\n|-\n| \u003ccode\u003etomorrow-night-eighties\u003c/code\u003e || Tomorrow Night Eighties\n|-\n| \u003ccode\u003erailscasts\u003c/code\u003e || Railscasts\n|-\n| \u003ccode\u003eobsidian\u003c/code\u003e || Obsidian\n|-\n| \u003ccode\u003edocco\u003c/code\u003e || Docco\n|-\n| \u003ccode\u003emono-blue\u003c/code\u003e || Mono Blue\n|-\n| \u003ccode\u003efoundation\u003c/code\u003e || Foundation\n|-\n| \u003ccode\u003eatelier-dune.dark\u003c/code\u003e || Atelier Dun - Dark\n|-\n| \u003ccode\u003eatelier-dune.light\u003c/code\u003e || Atelier Dun - Light\n|-\n| \u003ccode\u003eatelier-forest.dark\u003c/code\u003e || Atelier Forest - Dark\n|-\n| \u003ccode\u003eatelier-forest.light\u003c/code\u003e || Atelier Forest - Light\n|-\n| \u003ccode\u003eatelier-heath.dark\u003c/code\u003e || Atelier Heath - Dark\n|-\n| \u003ccode\u003eatelier-heath.light\u003c/code\u003e || Atelier Heath - Light\n|-\n| \u003ccode\u003eatelier-lakeside.dark\u003c/code\u003e || Atelier Lakeside - Dark\n|-\n| \u003ccode\u003eatelier-lakeside.light\u003c/code\u003e || Atelier Lakeside - Light\n|-\n| \u003ccode\u003eatelier-seaside.dark\u003c/code\u003e || Atelier Seaside - Dark\n|-\n| \u003ccode\u003eatelier-seaside.light\u003c/code\u003e || Atelier Seaside - Light\n|-\n| \u003ccode\u003eparaiso.dark\u003c/code\u003e || Paraiso - Dark\n|-\n| \u003ccode\u003eparaiso.light\u003c/code\u003e || Paraiso - Light\n|}\n\n== License ==\n\nThis Extention licensed under GPL v2 License.\n\n== Installation from Git ==\n\n=== Getting extension ===\n\nYou can use a Git clone tool to clone https://github.com/unikum/MediaWiki-SyntaxHighlight in the extensions directory of your wiki. For example using the Git command-line tool from \u003ccode\u003ewiki/extensions\u003c/code\u003e directory:\n\n\u003cpre\u003e\ngit clone https://github.com/unikum/MediaWiki-SyntaxHighlight SyntaxHighlight\n\u003c/pre\u003e\n\nMake sure the below control executes from within wiki/extensions/ folder. Otherwise you need to move this folder from current location to wiki/extensions folder using\n\n\u003cpre\u003e\nmv \u003csource\u003e \u003cdestination\u003e\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemklevtsov%2Fmediawiki-syntaxhighlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartemklevtsov%2Fmediawiki-syntaxhighlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemklevtsov%2Fmediawiki-syntaxhighlight/lists"}