-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
372 lines (333 loc) · 12.8 KB
/
Copy pathconfig.php
File metadata and controls
372 lines (333 loc) · 12.8 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
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<?php
return [
/*
|--------------------------------------------------------------------------
| Sites http://jigsaw.tighten.co/docs/collections/
|--------------------------------------------------------------------------
|
| Here is where you define your DocsFlow sites.
|
| Each site is a Jigsaw collection item, and can define any number of
| key-value pairs of settings that can be used in layouts and pages.
|
| Sites inherit all other settings defined in this configuration
| file, but you can override them for each site in particular.
|
*/
'collections' => [
'sartre' => [
'color' => 'purple',
'name' => 'Sartre Email',
'version' => '1.0.0',
'root' => 'email/sartre',
'path' => 'email/sartre/{-filename}',
'thumbnail' => 'https://s3.envato.com/files/247447963/thumb.png',
'sort' => 'page_order',
'search' => [
'algolia' => [
'appID' => 'CT7QSO9C70',
'appSecret' => '4bd1ce3d67eae6d7467ba6c2ed908e28',
'searchKey' => '0595b891776917fca3d49302cfe7c3e1',
'indexName' => 'sartre_email_docs',
],
],
],
'kant' => [
'color' => 'green',
'name' => 'Kant Email',
'version' => '2.4.0',
'root' => 'email/kant',
'path' => 'email/kant/{-filename}',
'thumbnail' => 'https://s3.envato.com/files/241937906/thumb.png',
'sort' => 'page_order',
'search' => [
'algolia' => [
'appID' => 'ZDMGGWH9CB',
'appSecret' => '1bbb9c5e2e72ba9043ac52afb6e9a9bf',
'searchKey' => '6988aea44371ce595f3db8f505c1c913',
'indexName' => 'kant_email_docs',
],
],
],
'acorn' => [
'color' => 'green',
'name' => 'Acorn Email Framework',
'version' => '1.0.1',
'root' => 'acorn',
'path' => 'acorn/{-filename}',
'thumbnail' => '/img/acorn/acorn-logo.png',
'sort' => 'page_order',
'search' => [
'algolia' => [
'appID' => '3LWQAP7M66',
'appSecret' => 'b49dfae3e51221a18a787bf08cd5c9ac',
'searchKey' => '31f8a4aaf91c407a5b341ebf24d9a6ec',
'indexName' => 'acorn_docs',
],
],
'social' => [
'github' => 'https://github.com/ThemeMountain/acorn',
'twitter' => 'https://twitter.com/thememountainco',
'envato' => 'https://themeforest.net/user/thememountain/portfolio?ref=thememountain',
],
],
'pine' => [
'color' => 'teal',
'name' => 'Pine Email Framework',
'version' => '2.1.0',
'root' => 'pine',
'path' => 'pine/{-filename}',
'thumbnail' => '/img/pine/pine.svg',
'sort' => 'page_order',
'search' => [
'algolia' => [
'appID' => '0LCC489H0Z',
'appSecret' => '6e18f554f9a98c10e5813431713cc8bb',
'searchKey' => 'f042911696635e063df3ebf9fb69a459',
'indexName' => 'pine_docs',
],
],
'social' => [
'github' => 'https://github.com/ThemeMountain/pine',
'twitter' => 'https://twitter.com/thememountainco',
'envato' => 'https://themeforest.net/user/thememountain/portfolio?ref=thememountain',
],
],
],
/*
|--------------------------------------------------------------------------
| Company Name
|--------------------------------------------------------------------------
|
| The company name is used in the <title> tag of your pages.
|
*/
'company' => 'ThemeMountain',
/*
|--------------------------------------------------------------------------
| Company Website
|--------------------------------------------------------------------------
|
| The company website URL.
|
*/
'company_url' => 'https://thememountain.com',
/*
|--------------------------------------------------------------------------
| Path http://jigsaw.tighten.co/docs/collections-paths/
|--------------------------------------------------------------------------
|
| Here you can specify how DocsFlow should organize sites in the build
| folders. This uses Jigsaw collection paths, and you can override
| it for each site in particular.
|
| With this default setting, if we add 'group' => 'open-source' to the
| config of a site collection named 'jigsaw', DocsFlow will output
| that site at: build_{env}/partners/blog
|
| So you can basically group collection items (sites) into a folder.
|
|
*/
// 'path' => '{group}/{collection}/{-filename}',
/*
|--------------------------------------------------------------------------
| Pretty URLs (permalinks) http://jigsaw.tighten.co/docs/pretty-urls/
|--------------------------------------------------------------------------
|
| When set to 'true', each Blade/Markdown file will be compiled to an
| index.html file and placed in its own folder, named after the
| original file. Set to false to disable and have DocsFlow
| preserve the original file names.
|
*/
'pretty' => true,
/*
|--------------------------------------------------------------------------
| Layout
|--------------------------------------------------------------------------
|
| Here you can choose the theme that your documentation pages will use.
| This will be applied globally to all pages you create, but you
| can override it with the 'extends' FrontMatter variable.
|
*/
'extends' => '_layouts.default.page',
/*
|--------------------------------------------------------------------------
| Accent Color
|--------------------------------------------------------------------------
|
| Set the default accent color.
|
| DocsFlow will use this together with the literal color class names from
| your Tailwind CSS config. You can override it for each site.
|
*/
'color' => 'blue',
/*
|--------------------------------------------------------------------------
| Social
|--------------------------------------------------------------------------
|
| Here is where you can specify the URLs to your social profiles.
| DocsFlow uses these in headers and footers by default, but
| you can use them anywhere in layouts or pages.
|
*/
'social' => [
'support' => 'https://thememountain.ticksy.com',
'twitter' => 'https://twitter.com/thememountainco',
'github' => 'https://github.com/ThemeMountain',
'envato' => 'https://themeforest.net/user/thememountain/portfolio?ref=thememountain',
],
/*
|--------------------------------------------------------------------------
| Support URL
|--------------------------------------------------------------------------
|
| Define your support channel. This is used by DocsFlow in different
| areas of the site. You can also use a mailto: link, if you want
| visitors to email you directly (not recommended).
|
*/
'support_url' => 'https://thememountain.ticksy.com',
/*
|--------------------------------------------------------------------------
| Search Drivers
|--------------------------------------------------------------------------
|
| Configure the third-party search drivers DocsFlow supports. Currently,
| DocsFlow ships with an Algolia driver. These credentials are pulled
| from your .env file, and will be used as the defaults for any
| site that specifies it uses Algolia Search.
|
| However, since Algolia allows creating multiple accounts under the same
| username, you can override these defaults at a site level. This way,
| you can use one Community plan per site instead of sharing limits
| across all your sites.
|
| Finally, DocsFlow also supports Algolia's DocSearch. If you want
| to use that for your documentation, make sure to fill in the
| API search key and index name in your .env file.
|
| "offline": Default. An offline JS search engine will be used.
| Data is stored in a global variable set in a
| .js file. Use this only for small sites.
|
| "algolia": Gets the default Algolia credentials defined
| in the .env file.
|
| "docsearch": Gets the search key and index name for docs
| that use Algolia's DocSearch.
|
*/
// KEEPING THIS FOR REF ONLY, WILL DOCUMENT AND REMOVE IT
'search' => 'offline',
// 'search' => [
// 'offline',
// 'algolia' => [
// 'appID' => getenv('ALGOLIA_APP_ID'),
// 'appSecret' => getenv('ALGOLIA_SECRET'),
// 'searchKey' => getenv('ALGOLIA_SEARCH'),
// ],
// 'docsearch' => [
// 'searchKey' => getenv('ALGOLIA_DOCSEARCH'),
// 'indexName' => getenv('ALGOLIA_DOCSEARCH_INDEX'),
// ],
// ],
/*
|--------------------------------------------------------------------------
| Google Analytics
|--------------------------------------------------------------------------
|
| Configure defaults for the analytics services DocsFlow supports.
| Applies globally unless overridden.
|
| 'google': Google Analytics tracking id
|
*/
'analytics' => [
'google' => [
'tracking_id' => ''
],
],
/*
|--------------------------------------------------------------------------
| Tunnel https://browsersync.io/docs/options#option-tunnel
|--------------------------------------------------------------------------
|
| DocsFlow allows you to expose your localhost to the web when developing,
| by creating a localhost tunnel with BrowserSync and localtunnel.me.
|
| This means you can share a live preview URL of what you're working on
| with anyone in the world. Works only when using 'npm run watch'.
|
| Set to `true` to get a random subdomain, or a valid subdomain string,
| to have BrowserSync try and use a custom subdomain name.
|
*/
'tunnel' => false,
/*
|--------------------------------------------------------------------------
| Helper Functions
|
| http://jigsaw.tighten.co/docs/collections-variables-and-functions/
|--------------------------------------------------------------------------
|
| Some helper functions that DocsFlow uses. You can add your own
| here, and even override them for each site in particular.
|
*/
'getEnv' => function($page) {
return getenv('NODE_ENV');
},
'getAssetPath' => function ($page, $assetPath) {
$env = getenv('NODE_ENV');
if ($env == 'offline') {
$path = $page->getPath();
$path_parts = pathinfo($path);
$dir = $path_parts['dirname'];
$relativePath = preg_replace('/\b([a-zA-Z0-9]*-?[a-zA-Z0-9]*)\w+\b/', '..', $dir);
return ltrim($relativePath, '/');
}
return '';
},
'getSVG' => function($name) {
return __DIR__ . '/source/img/icons/'.$name.'.svg';
},
'active' => function ($page, $path) {
$pages = collect(array_wrap($page));
$env = getenv('NODE_ENV');
return $pages->contains(function ($page) use ($path, $env) {
if ($env == 'offline') {
return str_contains($path['path'], $page->getFilename());
}
return str_is($page->getPath(), $path['path']);
});
},
'hasChildrenActive' => function ($page, $children) {
$children = collect($children);
$env = getenv('NODE_ENV');
return $children->contains(function ($link) use ($page, $env) {
if ($env == 'offline') {
return str_contains($page->getPath(), basename($link['path']));
}
return $page->getPath() == $link['path'];
});
},
/*
|--------------------------------------------------------------------------
| Jigsaw Internals
|--------------------------------------------------------------------------
|
| Leave these settings alone, unless you really know what you're doing.
|
*/
'baseUrl' => '',
'production' => false,
'build' => [
'source' => 'source',
'destination' => 'build_local',
],
];