@sveltia/cms 0.87.2 → 0.87.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -42
- package/dist/sveltia-cms.js +202 -200
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +206 -204
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +1387 -842
- package/types/public.d.ts +217 -149
package/types/public.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Standard IETF locale tag like `en` or `en-US`.
|
|
2
|
+
* Standard [IETF locale tag](https://en.wikipedia.org/wiki/IETF_language_tag) like `en` or `en-US`.
|
|
3
3
|
*/
|
|
4
4
|
export type LocaleCode = string;
|
|
5
5
|
/**
|
|
6
6
|
* An entry field name. It can be written in dot notation like `author.name` if the field is nested
|
|
7
|
-
* with an Object field. For a List subfield, a wildcard can be used like `authors.*.name`. We
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* with an Object field. For a List subfield, a wildcard can be used like `authors.*.name`. We call
|
|
8
|
+
* this a key path, which is derived from the [IndexedDB API
|
|
9
|
+
* terminology](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Terminology#key_path),
|
|
10
|
+
* and use it everywhere, as entry data is managed as a [flatten
|
|
11
|
+
* object](https://www.npmjs.com/package/flat) for easier access.
|
|
10
12
|
*/
|
|
11
13
|
export type FieldKeyPath = string;
|
|
12
14
|
/**
|
|
@@ -28,7 +30,8 @@ export type VectorImageFormat = "svg";
|
|
|
28
30
|
*/
|
|
29
31
|
export type RasterImageConversionFormat = "webp";
|
|
30
32
|
/**
|
|
31
|
-
* Raster image transformation options.
|
|
33
|
+
* Raster image transformation options. See our
|
|
34
|
+
* [README](https://github.com/sveltia/sveltia-cms#optimizing-images-for-upload) for details.
|
|
32
35
|
*/
|
|
33
36
|
export type RasterImageTransformationOptions = {
|
|
34
37
|
/**
|
|
@@ -36,7 +39,7 @@ export type RasterImageTransformationOptions = {
|
|
|
36
39
|
*/
|
|
37
40
|
format?: RasterImageConversionFormat;
|
|
38
41
|
/**
|
|
39
|
-
* Image quality between 0 and 100. Default: 85
|
|
42
|
+
* Image quality between 0 and 100. Default: `85`.
|
|
40
43
|
*/
|
|
41
44
|
quality?: number;
|
|
42
45
|
/**
|
|
@@ -122,7 +125,8 @@ export type DefaultMediaLibraryConfig = {
|
|
|
122
125
|
/**
|
|
123
126
|
* File transformation option map. The key is an
|
|
124
127
|
* original format like `png` or `jpeg`. It can also be `raster_image` that matches any supported
|
|
125
|
-
* raster image format.
|
|
128
|
+
* raster image format. See our
|
|
129
|
+
* [README](https://github.com/sveltia/sveltia-cms#optimizing-images-for-upload) for details.
|
|
126
130
|
*/
|
|
127
131
|
transformations?: FileTransformations;
|
|
128
132
|
};
|
|
@@ -136,7 +140,7 @@ export type DefaultMediaLibrary = {
|
|
|
136
140
|
config?: DefaultMediaLibraryConfig;
|
|
137
141
|
};
|
|
138
142
|
/**
|
|
139
|
-
* Options for the Cloudinary media library.
|
|
143
|
+
* Options for the [Cloudinary media library](https://decapcms.org/docs/cloudinary/).
|
|
140
144
|
*/
|
|
141
145
|
export type CloudinaryMediaLibrary = {
|
|
142
146
|
/**
|
|
@@ -154,15 +158,16 @@ export type CloudinaryMediaLibrary = {
|
|
|
154
158
|
*/
|
|
155
159
|
use_secure_url?: boolean;
|
|
156
160
|
/**
|
|
157
|
-
* Options to be passed to
|
|
161
|
+
* Options to be passed to Cloudinary, such as `multiple`.
|
|
158
162
|
* The `cloud_name` and `api_key` options are required for the global `media_library` option. See
|
|
159
|
-
*
|
|
160
|
-
*
|
|
163
|
+
* the [Cloudinary
|
|
164
|
+
* documentation](https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options)
|
|
165
|
+
* for a full list of available options.
|
|
161
166
|
*/
|
|
162
167
|
config?: Record<string, any>;
|
|
163
168
|
};
|
|
164
169
|
/**
|
|
165
|
-
* Settings for the Uploadcare media library.
|
|
170
|
+
* Settings for the [Uploadcare media library](https://decapcms.org/docs/uploadcare/).
|
|
166
171
|
*/
|
|
167
172
|
export type UploadcareMediaLibrarySettings = {
|
|
168
173
|
/**
|
|
@@ -177,13 +182,14 @@ export type UploadcareMediaLibrarySettings = {
|
|
|
177
182
|
defaultOperations?: string;
|
|
178
183
|
};
|
|
179
184
|
/**
|
|
180
|
-
* Options for the Uploadcare media library.
|
|
185
|
+
* Options for the [Uploadcare media library](https://decapcms.org/docs/uploadcare/).
|
|
181
186
|
*/
|
|
182
187
|
export type UploadcareMediaLibrary = {
|
|
183
188
|
/**
|
|
184
189
|
* Options to be passed to Uploadcare, such as `multiple`.
|
|
185
|
-
* The `publicKey` option is required for the global `media_library` option. See
|
|
186
|
-
* https://uploadcare.com/docs/uploads/file-uploader-options/ for a full list of
|
|
190
|
+
* The `publicKey` option is required for the global `media_library` option. See the [Uploadcare
|
|
191
|
+
* documentation](https://uploadcare.com/docs/uploads/file-uploader-options/) for a full list of
|
|
192
|
+
* available options.
|
|
187
193
|
*/
|
|
188
194
|
config?: Record<string, any>;
|
|
189
195
|
/**
|
|
@@ -207,11 +213,13 @@ export type StockAssetMediaLibrary = {
|
|
|
207
213
|
providers?: StockAssetProviderName[];
|
|
208
214
|
};
|
|
209
215
|
/**
|
|
210
|
-
* Supported media library.
|
|
216
|
+
* Supported [media library](https://decapcms.org/docs/configuration-options/#media-library).
|
|
211
217
|
*/
|
|
212
218
|
export type MediaLibrary = DefaultMediaLibrary | CloudinaryMediaLibrary | UploadcareMediaLibrary | StockAssetMediaLibrary;
|
|
213
219
|
/**
|
|
214
|
-
* Unified media library option that supports multiple libraries.
|
|
220
|
+
* Unified media library option that supports multiple libraries. See our
|
|
221
|
+
* [README](https://github.com/sveltia/sveltia-cms#configuring-multiple-media-libraries) for
|
|
222
|
+
* details.
|
|
215
223
|
*/
|
|
216
224
|
export type MediaLibraries = {
|
|
217
225
|
/**
|
|
@@ -233,9 +241,9 @@ export type MediaLibraries = {
|
|
|
233
241
|
stock_assets?: StockAssetMediaLibrary;
|
|
234
242
|
};
|
|
235
243
|
/**
|
|
236
|
-
*
|
|
244
|
+
* Base field properties that are common to all fields.
|
|
237
245
|
*/
|
|
238
|
-
export type
|
|
246
|
+
export type BaseFieldProps = {
|
|
239
247
|
/**
|
|
240
248
|
* Unique identifier for the field. It cannot include periods and spaces.
|
|
241
249
|
*/
|
|
@@ -250,10 +258,32 @@ export type CommonFieldProps = {
|
|
|
250
258
|
*/
|
|
251
259
|
comment?: string;
|
|
252
260
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
261
|
+
* Help message to be displayed below the input UI. Limited Markdown
|
|
262
|
+
* formatting is supported: bold, italic, strikethrough and links.
|
|
263
|
+
*/
|
|
264
|
+
hint?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Whether to show the preview of the field. Default: `true`.
|
|
255
267
|
*/
|
|
256
|
-
|
|
268
|
+
preview?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Whether to enable the editor UI
|
|
271
|
+
* in locales other than the default locale. Default: `false`. `duplicate` disables the UI in
|
|
272
|
+
* non-default like `false` but automatically copies the default locale’s value to other locales.
|
|
273
|
+
* `translate` and `none` are aliases of `true` and `false`, respectively. This option only works
|
|
274
|
+
* when i18n is set up with the global and collection-level `i18n` option.
|
|
275
|
+
*/
|
|
276
|
+
i18n?: boolean | "duplicate" | "translate" | "none";
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Common field properties. We have to allow arbitrary properties because custom widgets can have
|
|
280
|
+
* any properties. This is also required to enable schema autocomplete for the fields in IDEs.
|
|
281
|
+
*/
|
|
282
|
+
export type CommonFieldProps = BaseFieldProps & Record<string, any>;
|
|
283
|
+
/**
|
|
284
|
+
* Standard field properties for a built-in widget.
|
|
285
|
+
*/
|
|
286
|
+
export type StandardFieldProps = {
|
|
257
287
|
/**
|
|
258
288
|
* Whether to make data input on the field required.
|
|
259
289
|
* Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global
|
|
@@ -272,23 +302,6 @@ export type CommonFieldProps = {
|
|
|
272
302
|
* message. This option has no effect on a List or Object field with subfields.
|
|
273
303
|
*/
|
|
274
304
|
pattern?: [string | RegExp, string];
|
|
275
|
-
/**
|
|
276
|
-
* Help message to be displayed below the input UI. Limited Markdown
|
|
277
|
-
* formatting is supported: bold, italic, strikethrough and links.
|
|
278
|
-
*/
|
|
279
|
-
hint?: string;
|
|
280
|
-
/**
|
|
281
|
-
* Whether to show the preview of the field. Default: `true`.
|
|
282
|
-
*/
|
|
283
|
-
preview?: boolean;
|
|
284
|
-
/**
|
|
285
|
-
* Whether to enable the editor UI
|
|
286
|
-
* in locales other than the default locale. Default: `false`. `duplicate` disables the UI in
|
|
287
|
-
* non-default like `false` but automatically copies the default locale’s value to other locales.
|
|
288
|
-
* `translate` and `none` are aliases of `true` and `false`, respectively. This option only works
|
|
289
|
-
* when i18n is set up with the global and collection-level `i18n` option.
|
|
290
|
-
*/
|
|
291
|
-
i18n?: boolean | "duplicate" | "translate" | "none";
|
|
292
305
|
};
|
|
293
306
|
/**
|
|
294
307
|
* Field-level media library options.
|
|
@@ -309,8 +322,9 @@ export type MediaFieldProps = {
|
|
|
309
322
|
default?: string;
|
|
310
323
|
/**
|
|
311
324
|
* File types that the field should accept. The value would be a
|
|
312
|
-
* comma-separated list of unique file type specifiers, the format used for the HTML
|
|
313
|
-
*
|
|
325
|
+
* comma-separated list of unique file type specifiers, the format used for the HTML
|
|
326
|
+
* [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept)
|
|
327
|
+
* attribute.
|
|
314
328
|
*/
|
|
315
329
|
accept?: string;
|
|
316
330
|
/**
|
|
@@ -349,11 +363,11 @@ export type MediaFieldProps = {
|
|
|
349
363
|
*/
|
|
350
364
|
export type MultiValueFieldProps = {
|
|
351
365
|
/**
|
|
352
|
-
* Minimum number of items that can be added. Default: 0
|
|
366
|
+
* Minimum number of items that can be added. Default: `0`.
|
|
353
367
|
*/
|
|
354
368
|
min?: number;
|
|
355
369
|
/**
|
|
356
|
-
* Maximum number of items that can be added. Default:
|
|
370
|
+
* Maximum number of items that can be added. Default: `Infinity`.
|
|
357
371
|
*/
|
|
358
372
|
max?: number;
|
|
359
373
|
};
|
|
@@ -367,17 +381,17 @@ export type MultiOptionFieldProps = {
|
|
|
367
381
|
multiple?: boolean;
|
|
368
382
|
/**
|
|
369
383
|
* Minimum number of items that can be selected. Ignored if `multiple` is
|
|
370
|
-
* `false`. Default: 0
|
|
384
|
+
* `false`. Default: `0`.
|
|
371
385
|
*/
|
|
372
386
|
min?: number;
|
|
373
387
|
/**
|
|
374
388
|
* Maximum number of items that can be selected. Ignored if `multiple` is
|
|
375
|
-
* `false`. Default:
|
|
389
|
+
* `false`. Default: `Infinity`.
|
|
376
390
|
*/
|
|
377
391
|
max?: number;
|
|
378
392
|
/**
|
|
379
393
|
* Maximum number of options to be displayed as radio
|
|
380
|
-
* buttons (single-select) or checkboxes (multi-select) rather than a dropdown list. Default: 5
|
|
394
|
+
* buttons (single-select) or checkboxes (multi-select) rather than a dropdown list. Default: `5`.
|
|
381
395
|
*/
|
|
382
396
|
dropdown_threshold?: number;
|
|
383
397
|
};
|
|
@@ -403,8 +417,8 @@ export type VariableFieldType = {
|
|
|
403
417
|
*/
|
|
404
418
|
summary?: string;
|
|
405
419
|
/**
|
|
406
|
-
* Set of subfields. This option can be omitted; in that case, only
|
|
407
|
-
*
|
|
420
|
+
* Set of subfields. This option can be omitted; in that case, only the
|
|
421
|
+
* `type` property will be saved.
|
|
408
422
|
*/
|
|
409
423
|
fields?: Field[];
|
|
410
424
|
};
|
|
@@ -443,12 +457,12 @@ export type AdjacentLabelProps = {
|
|
|
443
457
|
export type CharCountProps = {
|
|
444
458
|
/**
|
|
445
459
|
* Minimum number of characters that can be entered in the input.
|
|
446
|
-
* Default: 0
|
|
460
|
+
* Default: `0`.
|
|
447
461
|
*/
|
|
448
462
|
minlength?: number;
|
|
449
463
|
/**
|
|
450
464
|
* Maximum number of characters that can be entered in the input.
|
|
451
|
-
* Default:
|
|
465
|
+
* Default: `Infinity`.
|
|
452
466
|
*/
|
|
453
467
|
maxlength?: number;
|
|
454
468
|
};
|
|
@@ -468,7 +482,7 @@ export type BooleanFieldProps = {
|
|
|
468
482
|
/**
|
|
469
483
|
* Boolean field definition.
|
|
470
484
|
*/
|
|
471
|
-
export type BooleanField = CommonFieldProps & BooleanFieldProps & AdjacentLabelProps;
|
|
485
|
+
export type BooleanField = CommonFieldProps & StandardFieldProps & BooleanFieldProps & AdjacentLabelProps;
|
|
472
486
|
/**
|
|
473
487
|
* Code field properties.
|
|
474
488
|
*/
|
|
@@ -483,9 +497,9 @@ export type CodeFieldProps = {
|
|
|
483
497
|
*/
|
|
484
498
|
default?: string | Record<string, string>;
|
|
485
499
|
/**
|
|
486
|
-
* Default language to be selected, like `js`. See
|
|
487
|
-
* https://prismjs.com/#supported-languages for a list of supported languages.
|
|
488
|
-
* string, which is plaintext.
|
|
500
|
+
* Default language to be selected, like `js`. See the [Prism
|
|
501
|
+
* documentation](https://prismjs.com/#supported-languages) for a list of supported languages.
|
|
502
|
+
* Default: empty string, which is plaintext.
|
|
489
503
|
*/
|
|
490
504
|
default_language?: string;
|
|
491
505
|
/**
|
|
@@ -509,7 +523,7 @@ export type CodeFieldProps = {
|
|
|
509
523
|
/**
|
|
510
524
|
* Code field definition.
|
|
511
525
|
*/
|
|
512
|
-
export type CodeField = CommonFieldProps & CodeFieldProps;
|
|
526
|
+
export type CodeField = CommonFieldProps & StandardFieldProps & CodeFieldProps;
|
|
513
527
|
/**
|
|
514
528
|
* Color field properties.
|
|
515
529
|
*/
|
|
@@ -536,7 +550,7 @@ export type ColorFieldProps = {
|
|
|
536
550
|
/**
|
|
537
551
|
* Color field definition.
|
|
538
552
|
*/
|
|
539
|
-
export type ColorField = CommonFieldProps & ColorFieldProps;
|
|
553
|
+
export type ColorField = CommonFieldProps & StandardFieldProps & ColorFieldProps;
|
|
540
554
|
/**
|
|
541
555
|
* Compute field properties.
|
|
542
556
|
*/
|
|
@@ -553,7 +567,7 @@ export type ComputeFieldProps = {
|
|
|
553
567
|
/**
|
|
554
568
|
* Compute field definition.
|
|
555
569
|
*/
|
|
556
|
-
export type ComputeField = CommonFieldProps & ComputeFieldProps;
|
|
570
|
+
export type ComputeField = CommonFieldProps & StandardFieldProps & ComputeFieldProps;
|
|
557
571
|
/**
|
|
558
572
|
* DateTime field properties.
|
|
559
573
|
*/
|
|
@@ -568,20 +582,22 @@ export type DateTimeFieldProps = {
|
|
|
568
582
|
*/
|
|
569
583
|
default?: string;
|
|
570
584
|
/**
|
|
571
|
-
* Storage format written in Moment.js
|
|
572
|
-
* https://momentjs.com/docs/#/displaying/format/
|
|
585
|
+
* Storage format written in [Moment.js
|
|
586
|
+
* tokens](https://momentjs.com/docs/#/displaying/format/). Default: ISO 8601 format.
|
|
573
587
|
*/
|
|
574
588
|
format?: string;
|
|
575
589
|
/**
|
|
576
|
-
* Date storage format written in Moment.js
|
|
577
|
-
* value is a string and the `format`
|
|
578
|
-
*
|
|
590
|
+
* Date storage format written in [Moment.js
|
|
591
|
+
* tokens](https://momentjs.com/docs/#/displaying/format/) if the value is a string and the `format`
|
|
592
|
+
* option is not defined. If `true`, ISO 8601 format is used unless the `format` option is defined.
|
|
593
|
+
* If `false`, date input/output is disabled.
|
|
579
594
|
*/
|
|
580
595
|
date_format?: string | boolean;
|
|
581
596
|
/**
|
|
582
|
-
* Time storage format written in Moment.js
|
|
583
|
-
* value is a string and the `format`
|
|
584
|
-
*
|
|
597
|
+
* Time storage format written in [Moment.js
|
|
598
|
+
* tokens](https://momentjs.com/docs/#/displaying/format/) if the value is a string and the `format`
|
|
599
|
+
* option is not defined. If `true`, ISO 8601 format is used unless the `format` option is defined.
|
|
600
|
+
* If `false`, time input/output is disabled.
|
|
585
601
|
*/
|
|
586
602
|
time_format?: string | boolean;
|
|
587
603
|
/**
|
|
@@ -592,7 +608,7 @@ export type DateTimeFieldProps = {
|
|
|
592
608
|
/**
|
|
593
609
|
* DateTime field definition.
|
|
594
610
|
*/
|
|
595
|
-
export type DateTimeField = CommonFieldProps & DateTimeFieldProps;
|
|
611
|
+
export type DateTimeField = CommonFieldProps & StandardFieldProps & DateTimeFieldProps;
|
|
596
612
|
/**
|
|
597
613
|
* File field properties.
|
|
598
614
|
*/
|
|
@@ -605,7 +621,7 @@ export type FileFieldProps = {
|
|
|
605
621
|
/**
|
|
606
622
|
* File field definition.
|
|
607
623
|
*/
|
|
608
|
-
export type FileField = CommonFieldProps & MediaFieldProps & FileFieldProps;
|
|
624
|
+
export type FileField = CommonFieldProps & StandardFieldProps & MediaFieldProps & FileFieldProps;
|
|
609
625
|
/**
|
|
610
626
|
* Hidden field properties.
|
|
611
627
|
*/
|
|
@@ -623,7 +639,7 @@ export type HiddenFieldProps = {
|
|
|
623
639
|
/**
|
|
624
640
|
* Hidden field definition.
|
|
625
641
|
*/
|
|
626
|
-
export type HiddenField = CommonFieldProps & HiddenFieldProps;
|
|
642
|
+
export type HiddenField = CommonFieldProps & StandardFieldProps & HiddenFieldProps;
|
|
627
643
|
/**
|
|
628
644
|
* Image field properties.
|
|
629
645
|
*/
|
|
@@ -636,9 +652,9 @@ export type ImageFieldProps = {
|
|
|
636
652
|
/**
|
|
637
653
|
* Image field definition.
|
|
638
654
|
*/
|
|
639
|
-
export type ImageField = CommonFieldProps & MediaFieldProps & ImageFieldProps;
|
|
655
|
+
export type ImageField = CommonFieldProps & StandardFieldProps & MediaFieldProps & ImageFieldProps;
|
|
640
656
|
/**
|
|
641
|
-
* KeyValue field properties.
|
|
657
|
+
* KeyValue field properties compatible with Static CMS.
|
|
642
658
|
*/
|
|
643
659
|
export type KeyValueFieldProps = {
|
|
644
660
|
/**
|
|
@@ -661,7 +677,7 @@ export type KeyValueFieldProps = {
|
|
|
661
677
|
/**
|
|
662
678
|
* KeyValue field definition.
|
|
663
679
|
*/
|
|
664
|
-
export type KeyValueField = CommonFieldProps & KeyValueFieldProps & MultiValueFieldProps;
|
|
680
|
+
export type KeyValueField = CommonFieldProps & StandardFieldProps & KeyValueFieldProps & MultiValueFieldProps;
|
|
665
681
|
/**
|
|
666
682
|
* List field properties.
|
|
667
683
|
*/
|
|
@@ -717,15 +733,16 @@ export type ListFieldProps = {
|
|
|
717
733
|
/**
|
|
718
734
|
* Whether to save the field value at the top-level of the data file
|
|
719
735
|
* without the field name. If the `single_file` i18n structure is enabled, the lists will still be
|
|
720
|
-
* saved under locale keys. Default: `false`. See
|
|
721
|
-
* https://github.com/sveltia/sveltia-cms#editing-data-files-with-a-top-level-list for
|
|
736
|
+
* saved under locale keys. Default: `false`. See our
|
|
737
|
+
* [README](https://github.com/sveltia/sveltia-cms#editing-data-files-with-a-top-level-list) for
|
|
738
|
+
* details.
|
|
722
739
|
*/
|
|
723
740
|
root?: boolean;
|
|
724
741
|
};
|
|
725
742
|
/**
|
|
726
743
|
* List field definition.
|
|
727
744
|
*/
|
|
728
|
-
export type ListField = CommonFieldProps & ListFieldProps & MultiValueFieldProps & VariableFieldProps;
|
|
745
|
+
export type ListField = CommonFieldProps & StandardFieldProps & ListFieldProps & MultiValueFieldProps & VariableFieldProps;
|
|
729
746
|
/**
|
|
730
747
|
* Map field properties.
|
|
731
748
|
*/
|
|
@@ -735,23 +752,24 @@ export type MapFieldProps = {
|
|
|
735
752
|
*/
|
|
736
753
|
widget: "map";
|
|
737
754
|
/**
|
|
738
|
-
* Default value. Accepts a stringified single
|
|
739
|
-
* that contains `type` and `coordinates`
|
|
755
|
+
* Default value. Accepts a stringified single
|
|
756
|
+
* [GeoJSON](https://geojson.org/) geometry object that contains `type` and `coordinates`
|
|
757
|
+
* properties.
|
|
740
758
|
*/
|
|
741
759
|
default?: string;
|
|
742
760
|
/**
|
|
743
|
-
* Precision of coordinates to be saved. Default: 7
|
|
761
|
+
* Precision of coordinates to be saved. Default: `7`.
|
|
744
762
|
*/
|
|
745
763
|
decimals?: number;
|
|
746
764
|
/**
|
|
747
|
-
* Geometry type. Default: Point
|
|
765
|
+
* Geometry type. Default: `Point`.
|
|
748
766
|
*/
|
|
749
767
|
type?: "Point" | "LineString" | "Polygon";
|
|
750
768
|
};
|
|
751
769
|
/**
|
|
752
770
|
* Map field definition.
|
|
753
771
|
*/
|
|
754
|
-
export type MapField = CommonFieldProps & MapFieldProps;
|
|
772
|
+
export type MapField = CommonFieldProps & StandardFieldProps & MapFieldProps;
|
|
755
773
|
/**
|
|
756
774
|
* Supported button name for the rich text editor.
|
|
757
775
|
*/
|
|
@@ -812,7 +830,7 @@ export type MarkdownFieldProps = {
|
|
|
812
830
|
/**
|
|
813
831
|
* Markdown field definition.
|
|
814
832
|
*/
|
|
815
|
-
export type MarkdownField = CommonFieldProps & MarkdownFieldProps;
|
|
833
|
+
export type MarkdownField = CommonFieldProps & StandardFieldProps & MarkdownFieldProps;
|
|
816
834
|
/**
|
|
817
835
|
* Number field properties.
|
|
818
836
|
*/
|
|
@@ -830,22 +848,22 @@ export type NumberFieldProps = {
|
|
|
830
848
|
*/
|
|
831
849
|
value_type?: "int" | "float" | string;
|
|
832
850
|
/**
|
|
833
|
-
* Minimum value that can be entered in the input. Default:
|
|
851
|
+
* Minimum value that can be entered in the input. Default: `-Infinity`.
|
|
834
852
|
*/
|
|
835
853
|
min?: number;
|
|
836
854
|
/**
|
|
837
|
-
* Maximum value that can be entered in the input. Default:
|
|
855
|
+
* Maximum value that can be entered in the input. Default: `Infinity`.
|
|
838
856
|
*/
|
|
839
857
|
max?: number;
|
|
840
858
|
/**
|
|
841
|
-
* Number to increase/decrease with the arrow key/button. Default: 1
|
|
859
|
+
* Number to increase/decrease with the arrow key/button. Default: `1`.
|
|
842
860
|
*/
|
|
843
861
|
step?: number;
|
|
844
862
|
};
|
|
845
863
|
/**
|
|
846
864
|
* Number field definition.
|
|
847
865
|
*/
|
|
848
|
-
export type NumberField = CommonFieldProps & NumberFieldProps & AdjacentLabelProps;
|
|
866
|
+
export type NumberField = CommonFieldProps & StandardFieldProps & NumberFieldProps & AdjacentLabelProps;
|
|
849
867
|
/**
|
|
850
868
|
* Object field properties.
|
|
851
869
|
*/
|
|
@@ -876,7 +894,7 @@ export type ObjectFieldProps = {
|
|
|
876
894
|
/**
|
|
877
895
|
* Object field definition.
|
|
878
896
|
*/
|
|
879
|
-
export type ObjectField = CommonFieldProps & ObjectFieldProps & VariableFieldProps;
|
|
897
|
+
export type ObjectField = CommonFieldProps & StandardFieldProps & ObjectFieldProps & VariableFieldProps;
|
|
880
898
|
/**
|
|
881
899
|
* Entry filter options for a Relation field.
|
|
882
900
|
*/
|
|
@@ -938,7 +956,7 @@ export type RelationFieldProps = {
|
|
|
938
956
|
/**
|
|
939
957
|
* Relation field definition.
|
|
940
958
|
*/
|
|
941
|
-
export type RelationField = CommonFieldProps & RelationFieldProps & MultiOptionFieldProps;
|
|
959
|
+
export type RelationField = CommonFieldProps & StandardFieldProps & RelationFieldProps & MultiOptionFieldProps;
|
|
942
960
|
/**
|
|
943
961
|
* Select field properties.
|
|
944
962
|
*/
|
|
@@ -963,7 +981,7 @@ export type SelectFieldProps = {
|
|
|
963
981
|
/**
|
|
964
982
|
* Select field definition.
|
|
965
983
|
*/
|
|
966
|
-
export type SelectField = CommonFieldProps & SelectFieldProps & MultiOptionFieldProps;
|
|
984
|
+
export type SelectField = CommonFieldProps & StandardFieldProps & SelectFieldProps & MultiOptionFieldProps;
|
|
967
985
|
/**
|
|
968
986
|
* String field properties.
|
|
969
987
|
*/
|
|
@@ -971,14 +989,14 @@ export type StringFieldProps = {
|
|
|
971
989
|
/**
|
|
972
990
|
* Widget name.
|
|
973
991
|
*/
|
|
974
|
-
widget
|
|
992
|
+
widget?: "string";
|
|
975
993
|
/**
|
|
976
994
|
* Default value.
|
|
977
995
|
*/
|
|
978
996
|
default?: string;
|
|
979
997
|
/**
|
|
980
998
|
* Data type. It’s useful when the input value needs a
|
|
981
|
-
* validation. Default: text
|
|
999
|
+
* validation. Default: `text`.
|
|
982
1000
|
*/
|
|
983
1001
|
type?: "text" | "url" | "email";
|
|
984
1002
|
/**
|
|
@@ -993,7 +1011,7 @@ export type StringFieldProps = {
|
|
|
993
1011
|
/**
|
|
994
1012
|
* String field definition.
|
|
995
1013
|
*/
|
|
996
|
-
export type StringField = CommonFieldProps & StringFieldProps & AdjacentLabelProps & CharCountProps;
|
|
1014
|
+
export type StringField = CommonFieldProps & StandardFieldProps & StringFieldProps & AdjacentLabelProps & CharCountProps;
|
|
997
1015
|
/**
|
|
998
1016
|
* Text field properties.
|
|
999
1017
|
*/
|
|
@@ -1010,7 +1028,7 @@ export type TextFieldProps = {
|
|
|
1010
1028
|
/**
|
|
1011
1029
|
* Text field definition.
|
|
1012
1030
|
*/
|
|
1013
|
-
export type TextField = CommonFieldProps & TextFieldProps & CharCountProps;
|
|
1031
|
+
export type TextField = CommonFieldProps & StandardFieldProps & TextFieldProps & CharCountProps;
|
|
1014
1032
|
/**
|
|
1015
1033
|
* UUID field properties.
|
|
1016
1034
|
*/
|
|
@@ -1039,15 +1057,29 @@ export type UuidFieldProps = {
|
|
|
1039
1057
|
/**
|
|
1040
1058
|
* UUID field definition.
|
|
1041
1059
|
*/
|
|
1042
|
-
export type UuidField = CommonFieldProps & UuidFieldProps;
|
|
1060
|
+
export type UuidField = CommonFieldProps & StandardFieldProps & UuidFieldProps;
|
|
1043
1061
|
/**
|
|
1044
1062
|
* Entry field using a built-in widget.
|
|
1045
1063
|
*/
|
|
1046
1064
|
export type StandardField = BooleanField | CodeField | ColorField | ComputeField | DateTimeField | FileField | HiddenField | ImageField | KeyValueField | ListField | MapField | MarkdownField | NumberField | ObjectField | RelationField | SelectField | StringField | TextField | UuidField;
|
|
1047
1065
|
/**
|
|
1048
|
-
*
|
|
1066
|
+
* Name of a built-in widget. Sveltia CMS supports all the built-in widgets provided by Decap CMS as
|
|
1067
|
+
* well as some new widgets.
|
|
1068
|
+
*/
|
|
1069
|
+
export type BuiltInWidgetName = "boolean" | "code" | "color" | "compute" | "datetime" | "file" | "hidden" | "image" | "keyvalue" | "list" | "map" | "markdown" | "number" | "object" | "relation" | "select" | "string" | "text" | "uuid";
|
|
1070
|
+
/**
|
|
1071
|
+
* Custom field properties.
|
|
1072
|
+
*/
|
|
1073
|
+
export type CustomFieldProps = {
|
|
1074
|
+
/**
|
|
1075
|
+
* Widget name.
|
|
1076
|
+
*/
|
|
1077
|
+
widget: Exclude<string, BuiltInWidgetName>;
|
|
1078
|
+
};
|
|
1079
|
+
/**
|
|
1080
|
+
* Entry field using a custom widget.
|
|
1049
1081
|
*/
|
|
1050
|
-
export type CustomField = CommonFieldProps &
|
|
1082
|
+
export type CustomField = CommonFieldProps & CustomFieldProps;
|
|
1051
1083
|
/**
|
|
1052
1084
|
* Entry field.
|
|
1053
1085
|
*/
|
|
@@ -1077,22 +1109,24 @@ export type I18nOptions = {
|
|
|
1077
1109
|
/**
|
|
1078
1110
|
* Locales to be enabled when
|
|
1079
1111
|
* creating a new entry draft. If this option is used, users will be able to disable the output of
|
|
1080
|
-
* non-default locales through the UI. See
|
|
1081
|
-
* https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content for
|
|
1112
|
+
* non-default locales through the UI. See our
|
|
1113
|
+
* [README](https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content) for
|
|
1114
|
+
* details.
|
|
1082
1115
|
*/
|
|
1083
1116
|
initial_locales?: LocaleCode[] | "all" | "default";
|
|
1084
1117
|
/**
|
|
1085
1118
|
* Whether to save collection entries in all the locales. If
|
|
1086
|
-
* `false`, users will be able to disable the output of non-default locales through the UI. See
|
|
1087
|
-
* https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content for
|
|
1119
|
+
* `false`, users will be able to disable the output of non-default locales through the UI. See our
|
|
1120
|
+
* [README](https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content) for
|
|
1121
|
+
* details.
|
|
1088
1122
|
*/
|
|
1089
1123
|
save_all_locales?: boolean;
|
|
1090
1124
|
/**
|
|
1091
1125
|
* Property name and value template used
|
|
1092
1126
|
* to add a canonical slug to entry files, which helps Sveltia CMS and some frameworks to link
|
|
1093
1127
|
* localized files when entry slugs are localized. The default property name is `translationKey`
|
|
1094
|
-
* used in Hugo’s multilingual support, and the default value is the default locale’s slug. See
|
|
1095
|
-
* https://github.com/sveltia/sveltia-cms#localizing-entry-slugs for details.
|
|
1128
|
+
* used in Hugo’s multilingual support, and the default value is the default locale’s slug. See our
|
|
1129
|
+
* [README](https://github.com/sveltia/sveltia-cms#localizing-entry-slugs) for details.
|
|
1096
1130
|
*/
|
|
1097
1131
|
canonical_slug?: {
|
|
1098
1132
|
key: string;
|
|
@@ -1102,8 +1136,8 @@ export type I18nOptions = {
|
|
|
1102
1136
|
* Whether to exclude the default locale
|
|
1103
1137
|
* from entry filenames. Default: `false`. This option applies to entry collections with the
|
|
1104
1138
|
* `multiple_files` i18n structure enabled, as well as to file/singleton collection items with the
|
|
1105
|
-
* `file` path ending with `.{{locale}}.<extension>`, aiming to support Zola’s multilingual
|
|
1106
|
-
* https://www.getzola.org/documentation/content/multilingual
|
|
1139
|
+
* `file` path ending with `.{{locale}}.<extension>`, aiming to support [Zola’s multilingual
|
|
1140
|
+
* sites](https://www.getzola.org/documentation/content/multilingual/).
|
|
1107
1141
|
*/
|
|
1108
1142
|
omit_default_locale_from_filename?: boolean;
|
|
1109
1143
|
};
|
|
@@ -1120,8 +1154,11 @@ export type CollectionFile = {
|
|
|
1120
1154
|
*/
|
|
1121
1155
|
label?: string;
|
|
1122
1156
|
/**
|
|
1123
|
-
* Name of a Material Symbols
|
|
1124
|
-
*
|
|
1157
|
+
* Name of a [Material Symbols
|
|
1158
|
+
* icon](https://fonts.google.com/icons?icon.set=Material+Symbols) to be displayed in the collection
|
|
1159
|
+
* file list and other places. See our
|
|
1160
|
+
* [README](https://github.com/sveltia/sveltia-cms#using-a-custom-icon-for-a-collection) for
|
|
1161
|
+
* details.
|
|
1125
1162
|
*/
|
|
1126
1163
|
icon?: string;
|
|
1127
1164
|
/**
|
|
@@ -1158,12 +1195,6 @@ export type CollectionFile = {
|
|
|
1158
1195
|
* I18n options. Default: `false`.
|
|
1159
1196
|
*/
|
|
1160
1197
|
i18n?: I18nOptions | boolean;
|
|
1161
|
-
/**
|
|
1162
|
-
* A special option to make this file a divider UI in the singleton
|
|
1163
|
-
* file list. Default: `false`. Not supported in a file collection. If `true`, other options will be
|
|
1164
|
-
* ignored, but you still have to provide a unique `name`.
|
|
1165
|
-
*/
|
|
1166
|
-
divider?: boolean;
|
|
1167
1198
|
/**
|
|
1168
1199
|
* Preview URL path template.
|
|
1169
1200
|
*/
|
|
@@ -1174,7 +1205,7 @@ export type CollectionFile = {
|
|
|
1174
1205
|
preview_path_date_field?: FieldKeyPath;
|
|
1175
1206
|
};
|
|
1176
1207
|
/**
|
|
1177
|
-
* Supported file extension.
|
|
1208
|
+
* Supported file extension. Actually it can be any string.
|
|
1178
1209
|
*/
|
|
1179
1210
|
export type FileExtension = "yml" | "yaml" | "toml" | "json" | "md" | "markdown" | "html" | string;
|
|
1180
1211
|
/**
|
|
@@ -1227,8 +1258,9 @@ export type SortableFields = {
|
|
|
1227
1258
|
*/
|
|
1228
1259
|
fields: FieldKeyPath[];
|
|
1229
1260
|
/**
|
|
1230
|
-
* Default sort settings. See
|
|
1231
|
-
* https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction for
|
|
1261
|
+
* Default sort settings. See our
|
|
1262
|
+
* [README](https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction) for
|
|
1263
|
+
* details.
|
|
1232
1264
|
*/
|
|
1233
1265
|
default?: SortableFieldsDefaultOptions;
|
|
1234
1266
|
};
|
|
@@ -1281,7 +1313,7 @@ export type EditorOptions = {
|
|
|
1281
1313
|
export type NestedCollectionOptions = {
|
|
1282
1314
|
/**
|
|
1283
1315
|
* Maximum depth to show nested items in the collection tree. Default:
|
|
1284
|
-
*
|
|
1316
|
+
* `Infinity`.
|
|
1285
1317
|
*/
|
|
1286
1318
|
depth?: number;
|
|
1287
1319
|
/**
|
|
@@ -1316,7 +1348,9 @@ export type CollectionMetaData = {
|
|
|
1316
1348
|
path?: CollectionMetaDataPath;
|
|
1317
1349
|
};
|
|
1318
1350
|
/**
|
|
1319
|
-
* Index file inclusion options.
|
|
1351
|
+
* Index file inclusion options. See our
|
|
1352
|
+
* [README](https://github.com/sveltia/sveltia-cms#including-hugos-special-index-file-in-a-folder-collection)
|
|
1353
|
+
* for details.
|
|
1320
1354
|
*/
|
|
1321
1355
|
export type CollectionIndexFile = {
|
|
1322
1356
|
/**
|
|
@@ -1330,7 +1364,8 @@ export type CollectionIndexFile = {
|
|
|
1330
1364
|
*/
|
|
1331
1365
|
label?: string;
|
|
1332
1366
|
/**
|
|
1333
|
-
* Name of a Material Symbols
|
|
1367
|
+
* Name of a [Material Symbols
|
|
1368
|
+
* icon](https://fonts.google.com/icons?icon.set=Material+Symbols) to be displayed in the editor UI.
|
|
1334
1369
|
* Default: `home`.
|
|
1335
1370
|
*/
|
|
1336
1371
|
icon?: string;
|
|
@@ -1344,6 +1379,25 @@ export type CollectionIndexFile = {
|
|
|
1344
1379
|
*/
|
|
1345
1380
|
editor?: EditorOptions;
|
|
1346
1381
|
};
|
|
1382
|
+
/**
|
|
1383
|
+
* A divider in the collection list and singleton list. See our
|
|
1384
|
+
* [README](https://github.com/sveltia/sveltia-cms#adding-dividers-to-the-collection-list) for
|
|
1385
|
+
* details.
|
|
1386
|
+
*/
|
|
1387
|
+
export type CollectionDivider = {
|
|
1388
|
+
/**
|
|
1389
|
+
* Unique identifier for the divider. Can be omitted, but it must be
|
|
1390
|
+
* unique across all the collections and singletons. This property is included here because in the
|
|
1391
|
+
* previous version of Sveltia CMS, a divider was defined as a collection with the `divider` option
|
|
1392
|
+
* set to `true`, and the `name` option was required.
|
|
1393
|
+
*/
|
|
1394
|
+
name?: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* Whether to make this collection a divider UI in the collection list.
|
|
1397
|
+
* It must be `true` to be used as a divider.
|
|
1398
|
+
*/
|
|
1399
|
+
divider: boolean;
|
|
1400
|
+
};
|
|
1347
1401
|
/**
|
|
1348
1402
|
* A raw collection defined in the configuration file. Note: In Sveltia CMS, a folder collection is
|
|
1349
1403
|
* called an entry collection.
|
|
@@ -1369,7 +1423,9 @@ export type Collection = {
|
|
|
1369
1423
|
*/
|
|
1370
1424
|
description?: string;
|
|
1371
1425
|
/**
|
|
1372
|
-
* Name of a Material Symbols
|
|
1426
|
+
* Name of a [Material Symbols
|
|
1427
|
+
* icon](https://fonts.google.com/icons?icon.set=Material+Symbols) to be displayed in the collection
|
|
1428
|
+
* list.
|
|
1373
1429
|
*/
|
|
1374
1430
|
icon?: string;
|
|
1375
1431
|
/**
|
|
@@ -1396,7 +1452,11 @@ export type Collection = {
|
|
|
1396
1452
|
path?: string;
|
|
1397
1453
|
/**
|
|
1398
1454
|
* Internal media folder path for the collection. This overrides
|
|
1399
|
-
* the global `media_folder` option.
|
|
1455
|
+
* the global `media_folder` option. It can be a relative path from the project root if it starts
|
|
1456
|
+
* with a slash. Otherwise it’s a path relative to the entry. If this option is omitted, the global
|
|
1457
|
+
* `media_folder` option value is used. See our
|
|
1458
|
+
* [README](https://github.com/sveltia/sveltia-cms#using-a-custom-media-folder-for-a-collection) for
|
|
1459
|
+
* details.
|
|
1400
1460
|
*/
|
|
1401
1461
|
media_folder?: string;
|
|
1402
1462
|
/**
|
|
@@ -1443,12 +1503,14 @@ export type Collection = {
|
|
|
1443
1503
|
frontmatter_delimiter?: string | string[];
|
|
1444
1504
|
/**
|
|
1445
1505
|
* Item slug template. Entry collection only. Default: `identifier_field`
|
|
1446
|
-
* option value.
|
|
1506
|
+
* option value. It’s possible to [localize the
|
|
1507
|
+
* slug](https://github.com/sveltia/sveltia-cms#localizing-entry-slugs) or [use a random
|
|
1508
|
+
* ID](https://github.com/sveltia/sveltia-cms#using-a-random-id-for-an-entry-slug).
|
|
1447
1509
|
*/
|
|
1448
1510
|
slug?: string;
|
|
1449
1511
|
/**
|
|
1450
1512
|
* The maximum number of characters allowed for an entry slug.
|
|
1451
|
-
* Entry collection only. Default:
|
|
1513
|
+
* Entry collection only. Default: `Infinity`.
|
|
1452
1514
|
*/
|
|
1453
1515
|
slug_length?: number;
|
|
1454
1516
|
/**
|
|
@@ -1459,7 +1521,9 @@ export type Collection = {
|
|
|
1459
1521
|
/**
|
|
1460
1522
|
* Custom sortable fields. Entry
|
|
1461
1523
|
* collection only. Default: `title`, `name`, `date`, `author` and `description`. For a Git backend,
|
|
1462
|
-
* commit author and commit date are also included by default.
|
|
1524
|
+
* commit author and commit date are also included by default. See our
|
|
1525
|
+
* [README](https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction) for
|
|
1526
|
+
* details.
|
|
1463
1527
|
*/
|
|
1464
1528
|
sortable_fields?: FieldKeyPath[] | SortableFields;
|
|
1465
1529
|
/**
|
|
@@ -1500,7 +1564,9 @@ export type Collection = {
|
|
|
1500
1564
|
/**
|
|
1501
1565
|
* Index file inclusion options. Entry
|
|
1502
1566
|
* collection only. If `true`, the default index file name is `_index`, which is used for Hugo’s
|
|
1503
|
-
* special index file.
|
|
1567
|
+
* special index file. See our
|
|
1568
|
+
* [README](https://github.com/sveltia/sveltia-cms#including-hugos-special-index-file-in-a-folder-collection)
|
|
1569
|
+
* for details.
|
|
1504
1570
|
*/
|
|
1505
1571
|
index_file?: CollectionIndexFile | boolean;
|
|
1506
1572
|
/**
|
|
@@ -1509,12 +1575,6 @@ export type Collection = {
|
|
|
1509
1575
|
* options.
|
|
1510
1576
|
*/
|
|
1511
1577
|
yaml_quote?: boolean;
|
|
1512
|
-
/**
|
|
1513
|
-
* A special option to make this collection a divider UI in the
|
|
1514
|
-
* collection list. Default: `false`. If `true`, other options will be ignored, but you still have
|
|
1515
|
-
* to provide a unique `name`.
|
|
1516
|
-
*/
|
|
1517
|
-
divider?: boolean;
|
|
1518
1578
|
/**
|
|
1519
1579
|
* A field key path to be used to find an
|
|
1520
1580
|
* entry thumbnail displayed on the entry list. A nested field can be specified using dot notation,
|
|
@@ -1525,7 +1585,7 @@ export type Collection = {
|
|
|
1525
1585
|
thumbnail?: FieldKeyPath | FieldKeyPath[];
|
|
1526
1586
|
/**
|
|
1527
1587
|
* The maximum number of entries that can be created in the collection.
|
|
1528
|
-
* Entry collection only. Default:
|
|
1588
|
+
* Entry collection only. Default: `Infinity`.
|
|
1529
1589
|
*/
|
|
1530
1590
|
limit?: number;
|
|
1531
1591
|
};
|
|
@@ -1599,14 +1659,15 @@ export type BackendOptions = {
|
|
|
1599
1659
|
graphql_api_root?: string;
|
|
1600
1660
|
/**
|
|
1601
1661
|
* Site domain used for OAuth, which will be included in the
|
|
1602
|
-
* `site_id` param to be sent to the API endpoint. Git backends only. Default:
|
|
1662
|
+
* `site_id` param to be sent to the API endpoint. Git backends only. Default:
|
|
1663
|
+
* [`location.hostname`](https://developer.mozilla.org/en-US/docs/Web/API/Location/hostname).
|
|
1603
1664
|
*/
|
|
1604
1665
|
site_domain?: string;
|
|
1605
1666
|
/**
|
|
1606
1667
|
* OAuth base URL origin. Git backends only. Required when using an
|
|
1607
|
-
* OAuth client other than Netlify, including Sveltia CMS
|
|
1608
|
-
*
|
|
1609
|
-
* (Gitea).
|
|
1668
|
+
* OAuth client other than Netlify, including [Sveltia CMS
|
|
1669
|
+
* Authenticator](https://github.com/sveltia/sveltia-cms-auth). Default: `https://api.netlify.com`
|
|
1670
|
+
* (GitHub), `https://gitlab.com` (GitLab) or `https://gitea.com/` (Gitea).
|
|
1610
1671
|
*/
|
|
1611
1672
|
base_url?: string;
|
|
1612
1673
|
/**
|
|
@@ -1654,8 +1715,8 @@ export type BackendOptions = {
|
|
|
1654
1715
|
/**
|
|
1655
1716
|
* Whether to enable or disable automatic deployments
|
|
1656
1717
|
* with any connected CI/CD provider, such as GitHub Actions or Cloudflare Pages. If `false`, the
|
|
1657
|
-
* `[skip ci]` prefix will be added to commit messages. Git backends only. Default: undefined
|
|
1658
|
-
* https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments for details.
|
|
1718
|
+
* `[skip ci]` prefix will be added to commit messages. Git backends only. Default: `undefined`. See
|
|
1719
|
+
* our [README](https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments) for details.
|
|
1659
1720
|
*/
|
|
1660
1721
|
automatic_deployments?: boolean;
|
|
1661
1722
|
};
|
|
@@ -1694,7 +1755,7 @@ export type JsonFormatOptions = {
|
|
|
1694
1755
|
*/
|
|
1695
1756
|
indent_style?: "space" | "tab";
|
|
1696
1757
|
/**
|
|
1697
|
-
* Indent size. Default: 2
|
|
1758
|
+
* Indent size. Default: `2`.
|
|
1698
1759
|
*/
|
|
1699
1760
|
indent_size?: number;
|
|
1700
1761
|
};
|
|
@@ -1703,7 +1764,7 @@ export type JsonFormatOptions = {
|
|
|
1703
1764
|
*/
|
|
1704
1765
|
export type YamlFormatOptions = {
|
|
1705
1766
|
/**
|
|
1706
|
-
* Indent size. Default: 2
|
|
1767
|
+
* Indent size. Default: `2`.
|
|
1707
1768
|
*/
|
|
1708
1769
|
indent_size?: number;
|
|
1709
1770
|
/**
|
|
@@ -1744,8 +1805,8 @@ export type OutputOptions = {
|
|
|
1744
1805
|
export type SiteConfig = {
|
|
1745
1806
|
/**
|
|
1746
1807
|
* Whether to load YAML/JSON site configuration file(s) when
|
|
1747
|
-
* manually initializing the CMS. This works
|
|
1748
|
-
* Default: `true`.
|
|
1808
|
+
* [manually initializing the CMS](https://decapcms.org/docs/manual-initialization/). This works
|
|
1809
|
+
* only in the `CMS.init()` method’s `config` option. Default: `true`.
|
|
1749
1810
|
*/
|
|
1750
1811
|
load_config_file?: boolean;
|
|
1751
1812
|
/**
|
|
@@ -1775,11 +1836,14 @@ export type SiteConfig = {
|
|
|
1775
1836
|
media_library?: MediaLibrary & GlobalMediaLibraryOptions;
|
|
1776
1837
|
/**
|
|
1777
1838
|
* Unified media library option that supports multiple
|
|
1778
|
-
* libraries.
|
|
1839
|
+
* libraries. See our
|
|
1840
|
+
* [README](https://github.com/sveltia/sveltia-cms#configuring-multiple-media-libraries) for
|
|
1841
|
+
* details.
|
|
1779
1842
|
*/
|
|
1780
1843
|
media_libraries?: MediaLibraries;
|
|
1781
1844
|
/**
|
|
1782
|
-
* Site URL. Default: current site’s origin
|
|
1845
|
+
* Site URL. Default: current site’s origin
|
|
1846
|
+
* ([`location.origin`](https://developer.mozilla.org/en-US/docs/Web/API/Location/origin)).
|
|
1783
1847
|
*/
|
|
1784
1848
|
site_url?: string;
|
|
1785
1849
|
/**
|
|
@@ -1801,15 +1865,17 @@ export type SiteConfig = {
|
|
|
1801
1865
|
*/
|
|
1802
1866
|
slug?: SlugOptions;
|
|
1803
1867
|
/**
|
|
1804
|
-
* Set of collections.
|
|
1868
|
+
* Set of collections. The list can also
|
|
1869
|
+
* contain dividers, which are used to group collections in the collection list.
|
|
1805
1870
|
*/
|
|
1806
|
-
collections: Collection[];
|
|
1871
|
+
collections: (Collection | CollectionDivider)[];
|
|
1807
1872
|
/**
|
|
1808
|
-
* Set of singleton files, such as
|
|
1809
|
-
* file or the homepage file. They are not part of any collection and can be
|
|
1810
|
-
* through the collection list.
|
|
1873
|
+
* Set of singleton files, such as
|
|
1874
|
+
* the site configuration file or the homepage file. They are not part of any collection and can be
|
|
1875
|
+
* accessed directly through the collection list. The list can also contain dividers. See our
|
|
1876
|
+
* [README](https://github.com/sveltia/sveltia-cms#using-singletons) for details.
|
|
1811
1877
|
*/
|
|
1812
|
-
singletons?: CollectionFile[];
|
|
1878
|
+
singletons?: (CollectionFile | CollectionDivider)[];
|
|
1813
1879
|
/**
|
|
1814
1880
|
* Global i18n options.
|
|
1815
1881
|
*/
|
|
@@ -1819,7 +1885,8 @@ export type SiteConfig = {
|
|
|
1819
1885
|
*/
|
|
1820
1886
|
editor?: EditorOptions;
|
|
1821
1887
|
/**
|
|
1822
|
-
* Data output options.
|
|
1888
|
+
* Data output options. See our
|
|
1889
|
+
* [README](https://github.com/sveltia/sveltia-cms#controlling-data-output) for details.
|
|
1823
1890
|
*/
|
|
1824
1891
|
output?: OutputOptions;
|
|
1825
1892
|
};
|
|
@@ -1844,7 +1911,8 @@ export type EditorComponentDefinition = {
|
|
|
1844
1911
|
*/
|
|
1845
1912
|
label: string;
|
|
1846
1913
|
/**
|
|
1847
|
-
* Name of a Material Symbols
|
|
1914
|
+
* Name of a [Material Symbols
|
|
1915
|
+
* icon](https://fonts.google.com/icons?icon.set=Material+Symbols) to be displayed in the editor UI.
|
|
1848
1916
|
*/
|
|
1849
1917
|
icon?: string;
|
|
1850
1918
|
/**
|