forked from thathoff/kirby-git-content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
55 lines (51 loc) · 1.75 KB
/
index.php
File metadata and controls
55 lines (51 loc) · 1.75 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
// support manual installation in plugins folder
@include_once __DIR__ . '/vendor/autoload.php';
// don't load plugin if it's disabled in the config.
if (option('thathoff.git-content.disable', false)) {
return;
}
$kirbyGit = new Thathoff\GitContent\KirbyGit();
Kirby::plugin('thathoff/git-content', [
'hooks' => $kirbyGit->getHooks(),
'routes' => $kirbyGit->getRoutes(),
'api' => [
'routes' => $kirbyGit->getApiRoutes()
],
'areas' => [
'git-content' => require __DIR__ . '/src/areas/git-content.php',
],
'permissions' => [
'thathoff.git-content' => [
'revert' => true,
'commit' => true,
'pull' => true,
'sync' => true,
'push' => true,
'createBranch' => true,
'switchBranch' => true,
'fetch' => true,
'reset' => true,
'removeIndexLock' => true,
],
],
'options' => [
'path' => null,
'pull' => null,
'push' => null,
'commit' => null,
'cronHooksEnabled' => null,
'cronHooksSecret' => null,
'commitMessage' => ':action:(:item:): :url:',
'windowsMode' => null,
'gitBin' => null,
'buttons' => null,
'displayErrors' => null,
'syncCommitterName' => 'Git Content Sync',
'syncCommitterEmail' => 'git-content-sync@localhost',
'syncConflictBranchPrefix' => 'conflict',
'syncDisabledMessage' => 'Sync is disabled',
'disableBranchManagement' => null,
'disable' => null,
],
]);