@sveltia/cms 0.27.3 → 0.29.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
@@ -28,9 +28,10 @@ While we are fixing reported bugs as fast as we can, usually within 24 hours, th
28
28
 
29
29
  - Ensuring maximum compatibility with existing versions of Netlify/Decap CMS
30
30
  - Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible (so far 80+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 100 by GA)
31
+ - Responding to user feedback
31
32
  - Implementing our own enhancement ideas
32
33
 
33
- At this point, **we are on track to ship version 1.0 in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates.
34
+ Sveltia CMS **version 1.0 is expected to ship in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates.
34
35
 
35
36
  ## Features
36
37
 
@@ -67,6 +68,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
67
68
  - In addition to a streamlined workflow, it offers great performance by loading files natively through the browser rather than using a slow, ad hoc REST API.
68
69
  - It also avoids a number of issues, including the 30 MB file size limit[^51], an unknown error with `publish_mode`[^75], and an unused `logo_url`[^49].
69
70
  - Eliminates some workflow disruptions in the Content Editor:
71
+ - A local backup of an entry draft is automatically created without interruption by a confirmation dialog. It can then be reliably restored without unexpected overwriting[^85].
70
72
  - Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
71
73
  - The editor closes automatically when an entry is saved.
72
74
  - You can upload multiple assets at once[^5].
@@ -77,6 +79,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
77
79
  - Search for entries and assets: `Ctrl+F` (Windows/Linux) or `Command+F` (macOS)
78
80
  - Create a new entry: `Ctrl+E` (Windows/Linux) or `Command+E` (macOS)
79
81
  - Save an entry: `Ctrl+S` (Windows/Linux) or `Command+S` (macOS)
82
+ - Cancel entry editing: `Escape`
80
83
  - Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available[^31]. Then update to the latest version with a single click[^66].
81
84
 
82
85
  ### Better accessibility
@@ -119,11 +122,13 @@ We are working hard to create a **significantly better alternative to Netlify CM
119
122
  - Solves problems with Chinese, Japanese and Korean (CJK) [IME](https://en.wikipedia.org/wiki/Input_method) text input in the rich text editor for the Markdown widget[^54].
120
123
  - You can use the `{{locale}}` template tag in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language[^63].
121
124
  - You can [localize entry slugs](#localizing-entry-slugs) while linking the localized files[^80], thanks to the support for Hugo’s `translationKey`[^81].
125
+ - Supports multiple files/folders i18n structure for file collections[^87]. To enable this, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/{{locale}}/about.json`. The global `structure` option is only used for folder collections.
122
126
 
123
127
  ### Better collections
124
128
 
125
129
  - Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections[^60].
126
130
  - You can choose a [custom icon for each collection](#using-a-custom-icon-for-a-collection)[^3].
131
+ - You can [add dividers to the collection list](#adding-dividers-to-the-collection-list).
127
132
  - Assets stored in a [per-collection media folder](#using-a-custom-media-folder-for-a-collection) can be displayed next to the entries.
128
133
  - Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
129
134
  - You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
@@ -143,6 +148,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
143
148
 
144
149
  ### Better data output
145
150
 
151
+ - Keys in generated JSON/TOML/YAML content are always sorted according to the order of configured fields, making Git commits clean and consistent[^86].
146
152
  - For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty.
147
153
  - Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
148
154
  - 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].
@@ -239,7 +245,6 @@ These limitations are expected to be resolved before GA:
239
245
  | Configuration | The application UI locales are only available in English and Japanese. Comprehensive config validation is not yet implemented. |
240
246
  | Media Libraries | Cloudinary and Uploadcare are not yet supported. |
241
247
  | Workflow | Editorial Workflow and Open Authoring are not yet supported. |
242
- | Content Editor | Auto-saving a draft entry is not yet implemented. |
243
248
  | Collections | Nested collections are not yet supported. |
244
249
  | Widgets | Custom widgets are not yet supported. See the table below for other limitations. |
245
250
  | Customizations | Custom previews, custom formatters and event subscriptions are not yet supported. |
@@ -250,7 +255,7 @@ These limitations are expected to be resolved before GA:
250
255
  | DateTime | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note: Decap CMS 3.1 has replaced Moment.js with [Day.js](https://day.js.org/); we’ll follow the change soon. |
251
256
  | File/Image | Field-specific media folders and media library options are not yet supported other than `media_library.config.max_file_size` for the default media library. |
252
257
  | Map | Not yet supported. |
253
- | Markdown | Editor components are not yet supported. |
258
+ | Markdown | Editor components, including built-in `image` and `code-block` as well as custom components, are not yet supported. |
254
259
 
255
260
  If we have missed any other features, let us know by [filing an issue](https://github.com/sveltia/sveltia-cms/issues).
256
261
 
@@ -269,7 +274,7 @@ If we have missed any other features, let us know by [filing an issue](https://g
269
274
  ### Before the 1.0 release
270
275
 
271
276
  - Enhanced compatibility with Netlify/Decap CMS (see above for the status)
272
- - Automation test coverage (Vitest + Playwright)
277
+ - Broad automation test coverage (Vitest + Playwright)
273
278
  - [Svelte 5](https://svelte.dev/blog/svelte-5-release-candidate) migration
274
279
  - Localization
275
280
  - Documentation
@@ -279,6 +284,7 @@ If we have missed any other features, let us know by [filing an issue](https://g
279
284
 
280
285
  ### After the 1.0 release
281
286
 
287
+ - Compatibility with Static CMS, a community fork of Netlify CMS
282
288
  - Roles[^23]
283
289
  - Config editor[^10]
284
290
  - Mobile support[^18]
@@ -407,6 +413,21 @@ You can have an icon for each collection for easy identification in the collecti
407
413
  folder: data/tags/
408
414
  ```
409
415
 
416
+ ### Adding dividers to the collection list
417
+
418
+ Sveltia CMS allows developers to add dividers to the collection list to distinguish different types of collections. To do this, insert a fake collection with the `divider: true` option along with a random `name`. In VS Code, you may get a validation error if `config.yml` is treated as a “Netlify YAML config” file. You can work around this by adding an empty `files` as well:
419
+
420
+ ```yaml
421
+ collections:
422
+ - name: products
423
+ ...
424
+ - divider: true
425
+ name: d1 # d2, d3, etc. Should be unique for each divider
426
+ files: []
427
+ - name: pages
428
+ ...
429
+ ```
430
+
410
431
  ### Using a custom media folder for a collection
411
432
 
412
433
  This is actually not new in Sveltia CMS but rather an _undocumented_ feature in Netlify/Decap CMS[^4]. You can specify media and public folders for each collection that override the [global media folder](https://decapcms.org/docs/configuration-options/#media-and-public-folders). Well, it’s [documented](https://decapcms.org/docs/collection-folder/#media-and-public-folder), but that’s probably not what you want.
@@ -756,11 +777,14 @@ This software is provided “as is” without any express or implied warranty. W
756
777
  [^75]: Netlify/Decap CMS [#5472](https://github.com/decaporg/decap-cms/issues/5472)
757
778
  [^76]: Netlify/Decap CMS [#4738](https://github.com/decaporg/decap-cms/issues/4738)
758
779
  [^77]: Netlify/Decap CMS [#6565](https://github.com/decaporg/decap-cms/issues/6565)
759
- [^78]: Netlify/Decap CMS [#3046](https://github.com/decaporg/decap-cms/issues/3046)
780
+ [^78]: Netlify/Decap CMS [#3046](https://github.com/decaporg/decap-cms/issues/3046), [#4363](https://github.com/decaporg/decap-cms/issues/4363)
760
781
  [^79]: Netlify/Decap CMS [#5726](https://github.com/decaporg/decap-cms/issues/5726)
761
782
  [^80]: Netlify/Decap CMS [#5493](https://github.com/decaporg/decap-cms/issues/5493), [#6600](https://github.com/decaporg/decap-cms/issues/6600)
762
783
  [^81]: Netlify/Decap CMS [#4645](https://github.com/decaporg/decap-cms/issues/4645)
763
784
  [^82]: Netlify/Decap CMS [#6500](https://github.com/decaporg/decap-cms/issues/6500)
764
785
  [^83]: Netlify/Decap CMS [#6508](https://github.com/decaporg/decap-cms/issues/6508)
765
786
  [^84]: Netlify/Decap CMS [#7142](https://github.com/decaporg/decap-cms/issues/7142)
787
+ [^85]: Netlify/Decap CMS [#5055](https://github.com/decaporg/decap-cms/issues/5055), [#5470](https://github.com/decaporg/decap-cms/issues/5470), [#6989](https://github.com/decaporg/decap-cms/issues/6989)
788
+ [^86]: Netlify/Decap CMS [#6759](https://github.com/decaporg/decap-cms/issues/6759), [#6901](https://github.com/decaporg/decap-cms/issues/6901)
789
+ [^87]: Netlify/Decap CMS [#5280](https://github.com/decaporg/decap-cms/issues/5280)
766
790
  [^100]: Netlify/Decap CMS [#5656](https://github.com/decaporg/decap-cms/issues/5656), [#5837](https://github.com/decaporg/decap-cms/issues/5837), [#5972](https://github.com/decaporg/decap-cms/issues/5972), [#6476](https://github.com/decaporg/decap-cms/issues/6476), [#6516](https://github.com/decaporg/decap-cms/issues/6516), [#6930](https://github.com/decaporg/decap-cms/issues/6930), [#6965](https://github.com/decaporg/decap-cms/issues/6965), [#7080](https://github.com/decaporg/decap-cms/issues/7080), [#7105](https://github.com/decaporg/decap-cms/issues/7105), [#7106](https://github.com/decaporg/decap-cms/issues/7106), [#7119](https://github.com/decaporg/decap-cms/issues/7119), [#7176](https://github.com/decaporg/decap-cms/issues/7176), [#7194](https://github.com/decaporg/decap-cms/issues/7194) — These `removeChild` crashes are common in React apps and seem to be caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).