@sveltia/cms 0.50.0 → 0.51.0
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 +40 -13
- package/dist/sveltia-cms.js +165 -165
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +166 -166
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
|
|
|
63
63
|
- [Disabling non-default locale content](#disabling-non-default-locale-content)
|
|
64
64
|
- [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
|
|
65
65
|
- [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
|
|
66
|
+
- [Controlling data output](#controlling-data-output)
|
|
66
67
|
- [Disabling automatic deployments](#disabling-automatic-deployments)
|
|
67
68
|
- [Setting up Content Security Policy](#setting-up-content-security-policy)
|
|
68
69
|
- [Support \& feedback](#support--feedback)
|
|
@@ -108,8 +109,8 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
108
109
|
|
|
109
110
|
- Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
|
|
110
111
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
111
|
-
- So far, 145+ of them, or
|
|
112
|
-
- Target: 250 or all relevant and fixable issues in a future release
|
|
112
|
+
- So far, 145+ of them, or 265+ including duplicates, have been effectively solved in Sveltia CMS
|
|
113
|
+
- Target: 250 or all relevant and fixable issues in a future release (Yes, you read it right)
|
|
113
114
|
- Note: Issues include both feature requests and bug reports; we also track their [stale issues](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+%22Closing+as+stale%22) and [discussions](https://github.com/decaporg/decap-cms/discussions)
|
|
114
115
|
- [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?labels=enhancement) if you have any specific issues you’d like to see solved!
|
|
115
116
|
- Responding to feedback from [@kyoshino](https://github.com/kyoshino)’s clients and regular users
|
|
@@ -120,7 +121,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
120
121
|
|
|
121
122
|
## Differentiators
|
|
122
123
|
|
|
123
|
-
We are working hard to create a **tremendously better alternative to Netlify CMS and Decap CMS** by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!
|
|
124
|
+
We are working hard to create a **tremendously better alternative to Netlify CMS and Decap CMS** by improving everything. Here’s what makes Sveltia CMS different. Look how damn serious we are!
|
|
124
125
|
|
|
125
126
|
### Better UX
|
|
126
127
|
|
|
@@ -210,7 +211,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
210
211
|
- The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
|
|
211
212
|
- File collections support multiple files/folders i18n structures[^87]. To enable it, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/about.{{locale}}.json` or `content/pages/{{locale}}/about.json`. For backward compatibility, the global `structure` option only applies to folder collections, and the default i18n structure for file collections remains single file.
|
|
212
213
|
- The List and Object widgets support the `i18n: duplicate` field configuration so that changes made with these widgets are duplicated between locales[^7][^68]. The `i18n` configuration can normally be used for the subfields.
|
|
213
|
-
- The `required` field option accepts an array of locale
|
|
214
|
+
- The `required` field option accepts an array of locale codes in addition to a boolean, making the field required for a subset of locales when i18n support is enabled. For example, if only English is required, you could write `required: [en]`. An empty array is equivalent to `required: false`.
|
|
214
215
|
- [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure[^21].
|
|
215
216
|
- The `{{locale}}` template tag can be used in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language[^63].
|
|
216
217
|
- It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters.
|
|
@@ -292,14 +293,15 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
292
293
|
### Better data output
|
|
293
294
|
|
|
294
295
|
- Keys in generated JSON/TOML/YAML content are always sorted by the order of configured fields, making Git commits clean and consistent[^86].
|
|
295
|
-
- Netlify/Decap CMS often, but not always, omits optional and empty fields from the output. Sveltia CMS aims at complete and consistent data output — it always saves proper values, such as an empty string
|
|
296
|
+
- Netlify/Decap CMS often, but not always, omits optional and empty fields from the output. Sveltia CMS aims at complete and consistent data output — it always saves proper values, such as an empty string, an empty array or `null`, instead of nothing (`undefined`), regardless of the `required` field option[^45][^46][^44][^154][^157].
|
|
296
297
|
- In other words, in Sveltia CMS, `required: false` makes data input optional, but doesn’t make data output optional.
|
|
297
|
-
-
|
|
298
|
+
- To omit empty optional fields from data output, use `omit_empty_optional_fields: true` in the [data output options](#controlling-data-output). This is useful if you have data type validations that expect `undefined`[^156].
|
|
298
299
|
- JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file[^11].
|
|
299
300
|
- Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
|
|
300
|
-
- String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
|
|
301
301
|
- YAML string folding (maximum line width) is disabled, mainly for framework compatibility[^119].
|
|
302
302
|
- DateTime field values in ISO 8601 format are stored in native date/time format instead of quoted strings when the data output is TOML[^147].
|
|
303
|
+
- Provides JSON/YAML format options as part of the [data output options](#controlling-data-output), including indentation and quotes[^9][^155].
|
|
304
|
+
- Note: the `yaml_quote: true` collection option added v0.5.10 is now deprecated and will be removed in v1.0.
|
|
303
305
|
|
|
304
306
|
### Better widgets
|
|
305
307
|
|
|
@@ -332,6 +334,8 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
332
334
|
- The built-in `image` editor component can be inserted with a single click.
|
|
333
335
|
- The default editor mode can be set by changing the order of the `modes` option[^58]. If you want to use the plain text editor by default, add `modes: [raw, rich_text]` to the field configuration.
|
|
334
336
|
- Line breaks are rendered as line breaks in the preview pane according to GitHub Flavored Markdown (GFM).
|
|
337
|
+
- Number
|
|
338
|
+
- If the `value_type` option is `int` or `float`, the `required` option is `false`, and the value is not entered, it will be saved as `null` instead of an empty string[^157].
|
|
335
339
|
- Object
|
|
336
340
|
- Sveltia CMS offers two ways to have conditional fields in a collection[^30]:
|
|
337
341
|
- The Object widget supports [variable types](https://decapcms.org/docs/variable-type-widgets/) (the `types` option) just like the List widget.
|
|
@@ -379,9 +383,9 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
379
383
|
- Compute
|
|
380
384
|
- The experimental `compute` widget allows to reference the value of other fields in the same collection, similar to the `summary` property for the List and Object widgets[^104]. Use the `value` property to define the value template, e.g. `posts-{{fields.slug}}` ([example](https://github.com/sveltia/sveltia-cms/issues/111)).
|
|
381
385
|
- The `value` property also supports a value of `{{index}}`, which can hold the index of a list item ([example](https://github.com/sveltia/sveltia-cms/issues/172)).
|
|
382
|
-
- KeyValue
|
|
383
|
-
- The new `keyvalue`
|
|
384
|
-
- The implementation is compatible with [Static CMS](https://staticjscms.netlify.app/docs/widget-keyvalue), a
|
|
386
|
+
- KeyValue (Dictionary)
|
|
387
|
+
- The new `keyvalue` widget allows users to add arbitrary key-value string pairs to a field[^123].
|
|
388
|
+
- The implementation is compatible with [Static CMS](https://staticjscms.netlify.app/docs/widget-keyvalue), but we provide a more intuitive UI. You can press Enter to move focus or add a new row while editing, and the preview is displayed in a clean table.
|
|
385
389
|
- UUID
|
|
386
390
|
- In addition to [generating UUIDs for entry slugs](#using-a-random-id-for-an-entry-slug), Sveltia CMS also supports the proposed `uuid` widget with the following properties[^12]:
|
|
387
391
|
- `prefix`: A string to be prepended to the value. Default: an empty string.
|
|
@@ -798,6 +802,21 @@ collections:
|
|
|
798
802
|
|
|
799
803
|
Note: The `root` option is ignored if the collection or collection file contains multiple fields. You can still have subfields under the List field.
|
|
800
804
|
|
|
805
|
+
### Controlling data output
|
|
806
|
+
|
|
807
|
+
Sveltia CMS supports some data output options, including JSON/YAML formatting preferences, in the configuration file. The default options are listed below:
|
|
808
|
+
|
|
809
|
+
```yaml
|
|
810
|
+
output:
|
|
811
|
+
omit_empty_optional_fields: false # or true
|
|
812
|
+
json:
|
|
813
|
+
indent_style: space # or tab
|
|
814
|
+
indent_size: 2
|
|
815
|
+
yaml:
|
|
816
|
+
quote: none # or single or double
|
|
817
|
+
indent_size: 2
|
|
818
|
+
```
|
|
819
|
+
|
|
801
820
|
### Disabling automatic deployments
|
|
802
821
|
|
|
803
822
|
You may already have a CI/CD tool set up on your Git repository to automatically deploy changes to production. Occasionally, you make a lot of changes to your content to quickly reach the CI/CD provider’s (free) build limits, or you just don’t want to see builds triggered for every single small change.
|
|
@@ -964,10 +983,10 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
|
|
|
964
983
|
|
|
965
984
|
- Implementing the remaining Netlify/Decap CMS features: Editorial Workflow, Open Authoring and nested collections
|
|
966
985
|
- Tackling more Netlify/Decap CMS issues, including MDX support[^122], manual entry sorting[^125], roles[^23], mobile optimization[^18] and config editor[^10] — Some [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) are already implemented in Sveltia CMS
|
|
967
|
-
- Exploring compatibility with Static CMS
|
|
968
|
-
- More integration options: stock photos, cloud storage providers,
|
|
969
|
-
- Advanced digital asset management (DAM) features, including image editing and tagging[^114]
|
|
986
|
+
- Exploring further compatibility with Static CMS
|
|
987
|
+
- More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools
|
|
970
988
|
- AI integrations for image generation and content writing
|
|
989
|
+
- Advanced digital asset management (DAM) features, including image editing and tagging[^114]
|
|
971
990
|
- End-user documentation
|
|
972
991
|
- Contributor documentation
|
|
973
992
|
- Marketplace for custom widgets, etc.
|
|
@@ -1294,3 +1313,11 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1294
1313
|
[^152]: Netlify/Decap CMS [#2491](https://github.com/decaporg/decap-cms/issues/2491)
|
|
1295
1314
|
|
|
1296
1315
|
[^153]: Netlify/Decap CMS [#7347](https://github.com/decaporg/decap-cms/issues/7347)
|
|
1316
|
+
|
|
1317
|
+
[^154]: Netlify/Decap CMS [#1449](https://github.com/decaporg/decap-cms/issues/1988), [#1449](https://github.com/decaporg/decap-cms/issues/1988)
|
|
1318
|
+
|
|
1319
|
+
[^155]: Netlify/Decap CMS [#5870](https://github.com/decaporg/decap-cms/issues/5870)
|
|
1320
|
+
|
|
1321
|
+
[^156]: Netlify/Decap CMS [#995](https://github.com/decaporg/decap-cms/issues/995), [#2017](https://github.com/decaporg/decap-cms/issues/2017), [#7120](https://github.com/decaporg/decap-cms/issues/7120), [#7186](https://github.com/decaporg/decap-cms/issues/7186)
|
|
1322
|
+
|
|
1323
|
+
[^157]: Netlify/Decap CMS [#2007](https://github.com/decaporg/decap-cms/issues/2007), [#2848](https://github.com/decaporg/decap-cms/issues/2848)
|