forked from trilbymedia/grav-plugin-git-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blueprints.yaml
289 lines (255 loc) · 8.05 KB
/
blueprints.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
name: Git Sync
type: plugin
slug: git-sync
version: 2.3.2
description: Allows to synchronize portions of Grav with Git Repositories (GitHub, BitBucket, GitLab)
icon: git
author:
name: Trilby Media, LLC
email: [email protected]
url: http://trilby.media
homepage: http://trilby.media
keywords: grav, plugin, git, sync, github, bitbucket, gitlab
issues: https://github.com/trilbymedia/grav-plugin-git-sync/issues
docs: https://github.com/trilbymedia/grav-plugin-git-sync
license: MIT
dependencies:
- { name: grav, version: '>=1.6.0' }
- { name: form, version: '>=2.16.3' }
form:
validation: strict
fields:
Basic:
type: section
title: Basic Settings
underline: true
enabled:
type: toggle
label: Plugin Status
highlight: 1
default: 0
options:
1: Enabled
0: Disabled
validate:
type: bool
folders:
type: select
multiple: true
label: Folders to Sync
classes: fancy
description: Removing folders after they have been synced may cause undesired results.
default:
- pages
options:
- pages
- themes
- plugins
- config
- data
selectize:
create: true
validate:
type: commalist
Sync:
type: section
title: Automatic Synchronization Settings
underline: true
SyncNotice:
type: hidden
markdown: true
text: |
! To improve the speed of saving pages you can disable automatic sync. Then, changes to a page will not be sent to the remote repository on every save. To sync your changes to the repository tap the GitSync button (<i class="fa fa-git"></i>) in the top left of the Administration Panel, or use the below Scheduler option to add the GitSync Syncronization Job to the Scheduler (<strong>Grav 1.6 required</strong>).
sync.on_save:
type: toggle
label: Sync on Page Save
help: Sync with the remote directory when a page is saved through the admin
default: 1
highlight: 1
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
sync.on_delete:
type: toggle
label: Sync on Page Delete
help: Sync with the remote directory when a page is deleted through the admin
default: 1
highlight: 1
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
sync.on_media:
type: toggle
label: Sync on Media Changes
help: Sync with the remote directory when a media is uploaded or deleted through the admin immediately (instead of only syncing when the page is saved)
default: 1
highlight: 1
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
sync.cron_enable:
type: toggle
label: Add Sync to Scheduler
help: Add GitSync Job to the Scheduler so it can automatically perform synchronization at the given time
default: 0
highlight: 1
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
sync.cron_at:
type: cron
label: Run Sync at
help: When should the Scheduler run the automatic GitSync synchronization job
default: '0 12,23 * * *'
Repo:
type: section
title: Git Repository Settings
underline: true
local_repository:
type: hidden
multiple: false
size: medium
label: Local Repository Path
repository:
type: text
label: Git Repository
placeholder: https://github.com/user/repository.git
no_user:
type: toggle
label: User not required
highlight: 0
default: 0
options:
1: Enabled
0: Disabled
description: With this setting enabled, the user can be left blank and it will be ignored from the authentication. Useful when only needing access tokens `token@host` rather than `user:password@host`
user:
type: text
label: Git User
placeholder: Username, not email
autocomplete: off
password:
type: enc-password
label: Git Password or Token
placeholder: Your Git Password or Token
description: Enter your password or token to encrypt and securely store it, then save the settings. It will not show up here for security reasons.
autocomplete: off
webhook:
type: text
label: Repository Web Hook URL
placeholder: /_git-sync
data-default@: '\Grav\Plugin\GitSyncPlugin::generateRandomWebhook'
webhook_enabled:
type: toggle
label: Web Hook Secret
highlight: 1
default: 0
options:
1: Enabled
0: Disabled
description: With this setting enabled, only authorized webhook calls will be able to trigger a synchronization (recommended)
webhook_secret:
type: text
label: Repository Web Hook Secret
placeholder: Your Web Hook Secret
data-default@: '\Grav\Plugin\GitSyncPlugin::generateWebhookSecret'
description: You can either use this randomly generated string or enter your own secret. <br /> **Bitbucket** does not yet support Webhook Secrets.
markdown: true
Advanced:
type: section
title: Advanced Git Settings
underline: true
branch:
type: text
default: master
label: Local Branch
placeholder: master
remote.name:
type: text
default: origin
label: Remote Name
placeholder: origin
remote.branch:
type: text
default: master
label: Remote Branch
placeholder: master
git.author:
type: select
default: gituser
label: Commits Author
options:
gituser: Use Git User Name
gitsync: Use GitSync Committer Name
gravuser: Use Grav User Name
gravfull: Use Grav User Full Name
git.message:
type: text
default: (Grav GitSync) Automatic Commit
label: Commit message
placeholder: (Grav GitSync) Automatic Commit
help: You can use {{pageTitle}} or {{pageRoute}} in your message as placeholders for the title or route of the page being saved
git.name:
type: text
default: GitSync
label: Committer Name
placeholder: GitSync
git.email:
type: text
default: [email protected]
label: Committer Email
placeholder: [email protected]
git.bin:
type: text
default: git
label: Git Binary Path
help: If the default `git` command doesn't work on your machine or if you want to specify a custom path, do it in here
placeholder: /usr/bin/git
git.ignore:
type: textarea
label: Git Ignore
help: Add custom git ignore rules to go along with GitSync. One per line
rows: 6
placeholder: |
node_modules
/.idea
git.private_key:
type: text
label: Private SSH Key
placeholder: ~/.ssh/id_rsa
markdown: true
description: >
In order to be able to sparse-checkout and push changes, it is expected you have an ssh-key configured for accessing the repository. This is usually found under `~/.ssh` and it needs to be configured for the same user that runs the web-server. <br />
<br />
Point it to the secret (not the public) and make also sure you have strict permissions to the file. (`-rw-------`). <br />
<br />
Example: `private_key: /home/www-data/.ssh/id_rsa`<br />
<br />
**IMPORTANT**: SSH keys with passphrase are __NOT__ supported. To remove a passphrase, run the `ssh-keygen -p` command and when asked for the new passphrase leave blank and return.
logging:
type: toggle
default: 0
label: Log Git Commands
help: Logs git commands. Useful to debug and troubleshoot git execution
highlight: 0
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
Actions:
type: section
title: Actions
underline: true
_wizard:
type: git-wizard
label: Text Variable
help: Text to add to the top of a page