Skip to content

Commit 19720ab

Browse files
chore: update readme
1 parent c51ff40 commit 19720ab

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Kirby Code Highlighter](.github/preview.png)
1+
![Kirby Code Highlighter](.github/preview-v2.png)
22

33
![Version](https://img.shields.io/packagist/v/bogdancondorachi/kirby-code-highlighter?style=for-the-badge&label=Version&labelColor=3d444d&color=096BDE)
44
![Dependency](https://img.shields.io/badge/kirby-%5E4.0-F4E162?style=for-the-badge&labelColor=3d444d)
@@ -17,7 +17,6 @@
1717
## 📦 Installation
1818

1919
### Composer
20-
2120
```bash
2221
composer require bogdancondorachi/kirby-code-highlighter
2322
```
@@ -28,40 +27,39 @@ git submodule add https://github.com/bogdancondorachi/kirby-code-highlighter.git
2827
```
2928

3029
### Manual
31-
32-
[Download](https://api.github.com/repos/bogdancondorachi/kirby-code-highlighter/zipball) and extract to: `/site/plugins/code-highlighter`
30+
[Download the plugin](https://api.github.com/repos/bogdancondorachi/kirby-code-highlighter/zipball) and extract it to: `/site/plugins/code-highlighter`
3331

3432
## ⚙️ Usage
3533

3634
### Kirby Blocks Field
37-
38-
This plugin seamlessly integrates with Kirby's native [`code` block](https://getkirby.com/docs/reference/panel/blocks/code) replacing its default behavior:
35+
This plugin overwrites the Kirby's native [`code` block](https://getkirby.com/docs/reference/panel/blocks/code), the output will be highlighted automatically.
3936

4037
```yaml
4138
blocks:
4239
type: blocks
4340
fieldsets:
4441
- code
4542
```
46-
*By default, the code block uses the default theme, but a theme selector is available if you wish to apply different themes to individual blocks. You can also customize the available language and theme options through the configuration settings.*
43+
*By default, the code block uses the [default theme](#default-theme), but a theme selector is available if you wish to apply different themes to individual blocks. You can also [customize](#custom-languages-and-themes-for-code-blocks) the available language and theme options.*
4744
4845
### KirbyText
4946
Embed syntax-highlighted code directly in KirbyText fields:
5047
51-
<pre lang="no-highlight"><code>```php
48+
````
49+
```php
5250
echo "Hello, world!";
5351
```
54-
</code></pre>
52+
````
5553
5654
Or use the plugin's custom KirbyTag with support for base64-encoded content:
5755
5856
```
5957
(code: ZWNobyAiSGVsbG8sIHdvcmxkISI7 lang: php theme: github-light)
6058
```
61-
*By default, the code tag applies the default theme. However, you can use the theme attribute to specify a different `theme` for individual code blocks.*
59+
*By default, the code tag applies the default theme. However, you can use the theme attribute to specify a different theme for individual code blocks.*
6260
6361
## 🔧 Configuration
64-
These options allow you to customize themes, language support, line numbering, and block behavior. All options are defined in your `config.php` file.
62+
All options go into your `config.php` file:
6563
6664
### Default Theme
6765
Set the default theme:
@@ -73,7 +71,7 @@ Set the default theme:
7371
```
7472
7573
### Light/Dark Dual Themes
76-
Set dual themes for light/dark mode:
74+
Set the themes for light/dark mode:
7775
7876
```php
7977
'bogdancondorachi.code-highlighter' => [
@@ -121,15 +119,15 @@ html.dark .phiki span {
121119
```
122120
123121
### Line Numbering
124-
Enable line numbers in your highlighted code blocks:
122+
Enable line numbers in code blocks:
125123
126124
```php
127125
'bogdancondorachi.code-highlighter' => [
128126
'gutter' => true,
129127
],
130128
```
131129
132-
### Custom Languages and Themes for Code Blocks
130+
### Customize Languages and Themes Selection
133131
Customize the languages and themes available in Kirby’s code block:
134132
135133
```php

0 commit comments

Comments
 (0)