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
description: Learn how to use Phiki in a Statamic application.
4
+
keywords: ['statamic']
5
+
---
6
+
7
+
If you have installed Phiki inside of a Statamic application, then you can use the CommonMark extension to highlight code blocks in your Markdown content.
8
+
9
+
You can enable the extension by registering it with Statamic's Markdown class inside the `boot` method of a service provider.
10
+
11
+
```php
12
+
use Statamic\Facades\Markdown;
13
+
use Phiki\Adapters\CommonMark\PhikiExtension;
14
+
use Phiki\Theme\Theme;
15
+
use Phiki\Phiki;
16
+
17
+
class AppServiceProvider extends ServiceProvider
18
+
{
19
+
public function boot(): void
20
+
{
21
+
Markdown::addExtension(fn () => new PhikiExtension(Theme::GithubLight, resolve(Phiki::class)));
22
+
}
23
+
}
24
+
```
25
+
26
+
For more information on using the `PhikiExtension`, see the [CommonMark](/commonmark) documentation.
27
+
28
+
If you wish to customize Phiki further, you can also refer to the [Laravel](/laravel) documentation since Statamic is built on top of Laravel.
0 commit comments