-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
32 lines (30 loc) · 890 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
use Kirby\Cms\App;
App::plugin('diverently/writer-block', [
'options' => [
'inline' => false,
'marks' => false,
'nodes' => true,
],
'blueprints' => [
'blocks/writer' => __DIR__ . '/blueprint.yml',
],
'snippets' => [
'blocks/writer' => __DIR__ . '/snippet.php',
],
'api' => [
'routes' => [
[
'pattern' => 'writer-block',
'action' => function () {
// Get options for Vue component
return [
'inline' => kirby()->option('diverently.writer-block.inline'),
'marks' => kirby()->option('diverently.writer-block.marks'),
'nodes' => kirby()->option('diverently.writer-block.nodes'),
];
}
]
]
],
]);