Download the PHP package s1syphos/kirby3-highlight without Composer
On this page you can find all versions of the php package s1syphos/kirby3-highlight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download s1syphos/kirby3-highlight
More information about s1syphos/kirby3-highlight
Files in s1syphos/kirby3-highlight
Package kirby3-highlight
Short Description Themeable server-side syntax highlighting for Kirby v3
License MIT
Informations about the package kirby3-highlight
Kirby3 Highlight
This plugin highlights your code snippets server-side - without external dependencies.
- Code highlighting for everyone - no javascript needed
- Comprehensive: supports 185 languages
- Customisable: 89 different styles included
Table of contents
- 1. Getting started
- 2. Configuration
- 3. Styling
- 4. Troubleshooting
- 5. Credits / License
Getting started
Use one of the following methods to install & use kirby3-highlight
:
Git submodule
If you know your way around Git, you can download this plugin as a submodule:
Composer
Clone or download
Now proper classes are added to your code snippets, making them 'themeable'. In order to do so, head over to the styling section.
Configuration
Change kirby-highlight
options to suit your needs:
Option | Type | Default | Description |
---|---|---|---|
s1syphos.highlight.class |
String | 'hljs' |
Adds one or more classes to the preceding pre element. |
s1syphos.highlight.languages |
Array | ['html', 'php'] |
Defines languages to be auto-detected (currently 176 languages are supported). |
s1syphos.highlight.escaping |
Boolean | false |
Enables character escaping (converting < to < , > to > , ..), see htmlspecialchars() docs. |
Styling
All highlight.js
styles are fully compatible with kirby3-highlight
. Just include it using the css()
helper:
Troubleshooting
If in doubt, check the correct spelling of the language in question - doing otherwise might break kirbytext()
.
Credits / License
kirby3-highlight
is based on Geert Bergman's highlight.php
library (a PHP port of highlight.js). It is licensed under the buy a license.
Special Thanks
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 :)