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

Commit d7d9e15

Browse files
authored
Cleaning README up a little
1 parent 5347f57 commit d7d9e15

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,29 @@ Change `kirby-highlight` options to suit your needs:
4646

4747
| Option | Type | Default | Description |
4848
| --- | --- | --- | --- |
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). |
5050
| `plugin.kirby-highlight.escaping` | Boolean | `false` | Enables character escaping (converting `<` to `&lt;`, `>` to `&gt;`, ..), see `htmlspecialchars()` [docs](http://php.net/manual/en/function.htmlspecialchars.php). |
5151

5252
## 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):
5454

5555
```php
5656
<?php echo css('assets/plugins/kirby-highlight/css/zenburn.css') ?>
5757
```
5858

59-
**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!**
6060

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');`
6363
- Replace `.hljs` with `[class^="language-"]` in the included stylesheet
6464
- 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
6666

6767
## 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)).
6969

7070
## Credits / License
7171
`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)?
7272

7373
## Special Thanks
7474
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 :)
75-

0 commit comments

Comments
 (0)