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-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ This plugin highlights your code snippets server-side - without external depende
12
12
-[1. Getting started](#getting-started)
13
13
-[2. Configuration](#configuration)
14
14
-[3. Styling](#styling)
15
-
-[4. Credits / License](#credits--license)
15
+
-[4. Troubleshooting](#troubleshooting)
16
+
-[5. Credits / License](#credits--license)
16
17
17
18
## Getting started
18
19
Use one of the following methods to install & use `kirby-highlight`:
@@ -55,11 +56,15 @@ To apply one of the many available stylesheets, just include it in your `<head>`
55
56
56
57
**Note: Most of the included themes depend some way or another on the class `.hljs` to be added to the code's container!**
57
58
58
-
In order to make sure the theme gets applied as planned, any of these methods will work:
59
+
In order to make sure the theme gets applied as planned, any of these methods will work:
60
+
- Simply use `kirby-pep` to [put it there](https://github.com/S1SYPHOS/kirby-pep): `c::set('plugin.kirby-pep.code_class', 'language-%s hljs');`
59
61
- Replace `.hljs` with `[class^="language-"]` in the included stylesheet
60
62
- Copy it to your `assets/css` directory and modify it
61
63
- Include the styles in your own workflow
62
64
65
+
## Troubleshooting
66
+
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).
67
+
63
68
## Credits / License
64
69
`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)?
0 commit comments