@sveltia/cms 0.43.0 → 0.44.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 CHANGED
@@ -280,7 +280,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
280
280
  - 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][^69].
281
281
  - String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
282
282
  - YAML string folding (maximum line width) is disabled, mainly for framework compatibility[^119].
283
- - DateTime fields are stored in native date/time format instead of quoted strings when the data format is TOML[^147].
283
+ - 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].
284
284
 
285
285
  ### Better widgets
286
286
 
@@ -296,6 +296,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
296
296
  - The `default` value is saved when you create a file collection item, not just a folder collection item[^78].
297
297
  - The `default` value supports the `{{locale}}` and `{{datetime}}` template tags, which will be replaced by the locale code and the current date/time in [ISO 8601 format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format), respectively[^101][^102].
298
298
  - List
299
+ - It’s possible to [edit data files with a top-level list](#editing-data-files-with-a-top-level-list)[^148].
299
300
  - The `min` and `max` options can be used separately. You don’t need to specify both to use either option[^145].
300
301
  - The Add Item button appears at the bottom of the list when the `add_to_top` option is not `true`, so you don’t have to scroll up each time to add new items.
301
302
  - Users can expand or collapse the entire list, while the Expand All and Collapse All buttons allow you to expand or collapse all items in the list at once.
@@ -728,6 +729,31 @@ It’s simple — just specify `{{uuid}}` (full UUID v4), `{{uuid_short}}` (last
728
729
  + slug: '{{uuid_short}}'
729
730
  ```
730
731
 
732
+ ### Editing data files with a top-level list
733
+
734
+ Sveltia CMS allows you to have a list at the top-level of a data file without a field name. It’s simple: create a single List field with the new `root` option. The configuration below reproduces the [Jekyll data file example](https://jekyllrb.com/docs/datafiles/#example-list-of-members):
735
+
736
+ ```yaml
737
+ collections:
738
+ - name: data
739
+ label: Data Files
740
+ files:
741
+ - name: members
742
+ label: List of Members
743
+ file: _data/members.yml
744
+ fields:
745
+ - name: members
746
+ label: Members
747
+ label_singular: Member
748
+ widget: list
749
+ root: true # This does the trick
750
+ fields:
751
+ - name: name
752
+ label: name
753
+ - name: github
754
+ label: GitHub
755
+ ```
756
+
731
757
  ### Disabling automatic deployments
732
758
 
733
759
  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.
@@ -1206,3 +1232,5 @@ This software is provided “as is” without any express or implied warranty. W
1206
1232
  [^146]: Netlify/Decap CMS [#2524](https://github.com/decaporg/decap-cms/issues/2524)
1207
1233
 
1208
1234
  [^147]: Netlify/Decap CMS [#3583](https://github.com/decaporg/decap-cms/issues/3583)
1235
+
1236
+ [^148]: Netlify/Decap CMS [#531](https://github.com/decaporg/decap-cms/issues/531)