This plugin highlights your code snippets server-side - without external dependencies.
- Comprehensive: supports 176 languages
- Customisable: 79 different styles included
Table of contents
Use one of the following methods to install & use
If you know your way around Git, you can download this plugin as a submodule:
git submodule add https://github.com/S1SYPHOS/kirby-highlight.git site/plugins/kirby-highlight
composer require S1SYPHOS/kirby-highlight:dev-composer
Clone or download
Activate the plugin
Activate the plugin with the following line in your
Now proper classes are added to your code snippets, making them 'themeable'. In order to do so, head over to the styling section. If you want to activate
kirby-highlight only on specific domains, read about multi-environment setups.
kirby-highlight options to suit your needs:
||Sets class of surrounding
||Defines languages to be auto-detected (currently 176 languages are supported).|
||Enables character escaping (converting
highlight.js styles are fully compatible with
kirby-highlight. Just include it using the
<?php echo css('assets/plugins/kirby-highlight/css/zenburn.css') ?>
Credits / License
kirby-highlight is based on Geert Bergman's
highlight.php library (a PHP port of highlight.js). It is licensed under the MIT License, but using Kirby in production requires you to buy a license. Are you ready for the next step?
I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)