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
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Activate the plugin with the following line in your `config.php`:
43
43
44
44
```text
45
45
c::set('plugin.kirby-highlight', true);
46
-
```
46
+
```
47
47
48
48
Now proper classes are added to your code snippets, making them 'themeable'. In order to do so, head over to the [styling](#styling) section. If you want to activate `kirby-highlight` only on specific domains, read about [multi-environment setups](https://getkirby.com/docs/developer-guide/configuration/options).
49
49
@@ -52,6 +52,7 @@ Change `kirby-highlight` options to suit your needs:
52
52
53
53
| Option | Type | Default | Description |
54
54
| --- | --- | --- | --- |
55
+
|`plugin.kirby-highlight.class`| String |`'hljs'`| Sets class of surrounding `pre` container. |
55
56
|`plugin.kirby-highlight.languages`| Array |`['html', 'php']`| Defines languages to be auto-detected (currently 176 languages are supported). |
56
57
|`plugin.kirby-highlight.escaping`| Boolean |`false`| Enables character escaping (converting `<` to `<`, `>` to `>`, ..), see `htmlspecialchars()`[docs](http://php.net/manual/en/function.htmlspecialchars.php). |
57
58
@@ -62,13 +63,6 @@ All `highlight.js` styles are fully compatible with `kirby-highlight`. Just incl
**Note: For most themes to work, the class `.hljs` needs to be added to the code's container!**
66
-
67
-
To resolve this, any of the following will do:
68
-
- 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');`
69
-
- Replace `.hljs` with `[class^="language-"]` in the included stylesheet
70
-
- Copy it to your `assets/css` directory and modify it
71
-
- Include the styles in your own workflow
72
66
73
67
## Troubleshooting
74
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)).
0 commit comments