Default Configuration

1// config/twill.php
2 
3return [
4 'block_editor' => [
5 /*
6 |--------------------------------------------------------------------------
7 | Twill Block Editor configuration
8 |--------------------------------------------------------------------------
9 |
10 | This array allows you to provide the package with your configuration
11 | for the Block editor field and Editor features.
12 |
13 */
14 'block_single_layout' => 'site.layouts.block', // layout to use when rendering a single block in the editor
15 'block_views_path' => 'site.blocks', // path where a view file per block type is stored
16 'block_views_mappings' => [], // custom mapping of block types and views
17 'block_presenter_path' => null, // allow to set a custom presenter to a block model
18 // Indicates if blocks templates should be inlined in HTML.
19 // When setting to false, make sure to build Twill with your all your custom blocks.
20 'inline_blocks_templates' => true,
21 'custom_vue_blocks_resource_path' => 'assets/js/blocks',
22 'use_twill_blocks' => ['text', 'image'],
23 'crops' => [
24 'image' => [
25 'desktop' => [
26 [
27 'name' => 'desktop',
28 'ratio' => 16 / 9,
29 'minValues' => [
30 'width' => 100,
31 'height' => 100,
32 ],
33 ],
34 ],
35 'tablet' => [
36 [
37 'name' => 'tablet',
38 'ratio' => 4 / 3,
39 'minValues' => [
40 'width' => 100,
41 'height' => 100,
42 ],
43 ],
44 ],
45 'mobile' => [
46 [
47 'name' => 'mobile',
48 'ratio' => 1,
49 'minValues' => [
50 'width' => 100,
51 'height' => 100,
52 ],
53 ],
54 ],
55 ],
56 ],
57 'repeaters' => [],
58 'core_icons' => dirname(__DIR__) . '/frontend/icons',
59 'directories' => [
60 'source' => [
61 'blocks' => [
62 [
63 'path' => base_path('vendor/area17/twill/src/Commands/stubs/blocks'),
64 'source' => A17\Twill\Services\Blocks\Block::SOURCE_TWILL,
65 ],
66 [
67 'path' => resource_path('views/twill/blocks'),
68 'source' => A17\Twill\Services\Blocks\Block::SOURCE_APP,
69 ],
70 ],
71 'repeaters' => [
72 [
73 'path' => resource_path('views/twill/repeaters'),
74 'source' => A17\Twill\Services\Blocks\Block::SOURCE_APP,
75 ],
76 [
77 'path' => base_path('vendor/area17/twill/src/Commands/stubs/repeaters'),
78 'source' => A17\Twill\Services\Blocks\Block::SOURCE_TWILL,
79 ],
80 ],
81 'icons' => [
82 dirname(__DIR__) . '/frontend/icons',
83 resource_path('views/twill/icons'),
84 ],
85 ],
86 'destination' => [
87 'make_dir' => true,
88 'blocks' => resource_path('views/twill/blocks'),
89 'repeaters' => resource_path('views/twill/repeaters'),
90 ],
91 ],
92 ],
93];