You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,30 +46,29 @@ Change `kirby-highlight` options to suit your needs:
46
46
47
47
| Option | Type | Default | Description |
48
48
| --- | --- | --- | --- |
49
-
|`plugin.kirby-highlight.languages`| Array |`['html', 'php']`| Defines languages to be auto-detected (currently [141 languages](https://github.com/S1SYPHOS/kirby-highlight/tree/master/vendor/scrivo/highlight.php/Highlight/languages) are supported). |
49
+
|`plugin.kirby-highlight.languages`| Array |`['html', 'php']`| Defines languages to be auto-detected (currently 176 languages are supported). |
50
50
|`plugin.kirby-highlight.escaping`| Boolean |`false`| Enables character escaping (converting `<` to `<`, `>` to `>`, ..), see `htmlspecialchars()`[docs](http://php.net/manual/en/function.htmlspecialchars.php). |
51
51
52
52
## Styling
53
-
Since `kirby-highlight` outputs the same markup like `highlight.js`, all styles created for the latter are suitable as well. To apply one of the many available stylesheets, just include it in your `<head>` element using the `css()` helper:
53
+
All `highlight.js`styles are fully compatible with `kirby-highlight`. Just include it using the `css()`[helper](https://getkirby.com/docs/cheatsheet/helpers/css):
**Note: Most of the included themes depend some way or another on the class `.hljs` to be added to the code's container!**
59
+
**Note: For most themes to work, the class `.hljs` needs to be added to the code's container!**
60
60
61
-
In order to make sure the theme gets applied as planned, any of these methods will work:
62
-
- Simply use `kirby-pep` to [put it there](https://github.com/S1SYPHOS/kirby-pep): `c::set('plugin.kirby-pep.code_class', 'language-%s hljs');`
61
+
To resolve this, any of the following will do:
62
+
- Simply use the [Kirby PEP](https://github.com/S1SYPHOS/kirby-pep) plugin and add the following line to your `config.php`: `c::set('plugin.kirby-pep.code_class', 'language-%s hljs');`
63
63
- Replace `.hljs` with `[class^="language-"]` in the included stylesheet
64
64
- Copy it to your `assets/css` directory and modify it
65
-
- Include the styles in your own workflow
65
+
- Include the styles in your own workflow
66
66
67
67
## Troubleshooting
68
-
Adding an unsupported language breaks `kirbytext()` parsing of the code snippet in question. Always be sure to only include [valid languages](https://github.com/S1SYPHOS/kirby-highlight/tree/master/vendor/scrivo/highlight.php/Highlight/languages).
68
+
If in doubt, check the [correct spelling](https://github.com/S1SYPHOS/kirby-highlight/tree/master/vendor/scrivo/highlight.php/Highlight/languages)of the language in question - doing otherwise breaks `kirbytext()` (see [#2](https://github.com/S1SYPHOS/kirby-highlight/issues/2)).
69
69
70
70
## Credits / License
71
71
`kirby-highlight` is based on Geert Bergman's `highlight.php` library (a PHP port of [highlight.js](https://highlightjs.org)). It is licensed under the [MIT License](LICENSE), but **using Kirby in production** requires you to [buy a license](https://getkirby.com/buy). Are you ready for the [next step](https://getkirby.com/next)?
72
72
73
73
## Special Thanks
74
74
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 :)
0 commit comments