Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Commit cfc4e97

Browse files
authored
Referenced [kirby-pep](https://github.com/S1SYPHOS/kirby-pep) & added 'Troubleshooting' section
1 parent ef9bd1b commit cfc4e97

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This plugin highlights your code snippets server-side - without external depende
1212
- [1. Getting started](#getting-started)
1313
- [2. Configuration](#configuration)
1414
- [3. Styling](#styling)
15-
- [4. Credits / License](#credits--license)
15+
- [4. Troubleshooting](#troubleshooting)
16+
- [5. Credits / License](#credits--license)
1617

1718
## Getting started
1819
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>`
5556

5657
**Note: Most of the included themes depend some way or another on the class `.hljs` to be added to the code's container!**
5758

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');`
5961
- Replace `.hljs` with `[class^="language-"]` in the included stylesheet
6062
- Copy it to your `assets/css` directory and modify it
6163
- Include the styles in your own workflow
6264

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+
6368
## Credits / License
6469
`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)?
6570

0 commit comments

Comments
 (0)