@sveltia/cms 0.67.0 → 0.68.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
@@ -67,6 +67,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
67
67
  - [Disabling non-default locale content](#disabling-non-default-locale-content)
68
68
  - [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
69
69
  - [Configuring multiple media libraries](#configuring-multiple-media-libraries)
70
+ - [Optimizing images for uploaded](#optimizing-images-for-uploaded)
70
71
  - [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
71
72
  - [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
72
73
  - [Controlling data output](#controlling-data-output)
@@ -78,6 +79,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
78
79
  - [Roadmap](#roadmap)
79
80
  - [Before the 1.0 release](#before-the-10-release)
80
81
  - [After the 1.0 release](#after-the-10-release)
82
+ - [Trivia](#trivia)
81
83
  - [Related links](#related-links)
82
84
  - [As seen on](#as-seen-on)
83
85
  - [Disclaimer](#disclaimer)
@@ -102,8 +104,6 @@ Sveltia CMS is the only project that doesn’t inherit the complexity, technical
102
104
 
103
105
  While Sveltia CMS is specifically designed to replace legacy Netlify CMS instances, it also aims to serve as a substitute for the other Netlify CMS successors. We hope that, especially with the [robust i18n support](#better-i18n-support), our product will eventually become an attractive choice for anyone looking for a free headless CMS.
104
106
 
105
- Trivia: The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. And now we are completely rewriting it in Svelte. So this is effectively the second time the application has gone through a framework migration.
106
-
107
107
  ### Our goals
108
108
 
109
109
  - Making Sveltia CMS a viable, definitive successor to Netlify CMS
@@ -116,12 +116,12 @@ Trivia: The [original version of Netlify CMS](https://github.com/netlify/netlify
116
116
 
117
117
  Sveltia CMS is currently in **beta** and version 1.0 (GA) is expected to ship in mid-2025. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates. See also our [roadmap](#roadmap).
118
118
 
119
- While we fix reported bugs as quickly as possible, usually within 24 hours, our overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also involves different kinds of activities that require considerable effort:
119
+ While we fix reported bugs as quickly as possible, usually within 24 hours, our overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also a complicated system that involves various kinds of activities that require considerable effort:
120
120
 
121
121
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
122
122
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
123
123
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
124
- - So far, 185+ issues, or 375+ if including duplicates, have been effectively solved in Sveltia CMS
124
+ - So far, 190+ issues, or 380+ if including duplicates, have been effectively solved in Sveltia CMS
125
125
  - Target:
126
126
  - 200 issues, or 400 if including duplicates, by GA (almost there)
127
127
  - 350 issues, or 600 if including duplicates, in the future
@@ -133,7 +133,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
133
133
  - Responding to requests from the maintainer’s clients
134
134
  - Making the code clean and maintainable
135
135
 
136
- ![185 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250327)<br>
136
+ ![190 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250403)<br>
137
137
 
138
138
  ## Differentiators
139
139
 
@@ -228,7 +228,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
228
228
  - Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
229
229
  - Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
230
230
  - Developers can select the local and remote backends while working on a local server.
231
- - The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194]
231
+ - The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194] The persistent storage is not yet supported in Safari.
232
232
 
233
233
  ### Better i18n support
234
234
 
@@ -366,6 +366,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
366
366
  - Code
367
367
  - More than 300 languages are available, thanks to [Prism](https://prismjs.com/)’s extensive language support.
368
368
  - The language switcher always appears in the user interface, so it’s easy to spot and change the selected language.
369
+ - Dynamic loading of language modes work as expected.[^198]
369
370
  - Code fields under a List field work as expected, saving both code and language.[^181]
370
371
  - Color
371
372
  - The widget doesn’t cause scrolling issues.[^128]
@@ -479,6 +480,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
479
480
  - Enhancements to media library integrations:
480
481
  - Supports multiple media libraries with the [new `media_libraries` option](#configuring-multiple-media-libraries).[^195]
481
482
  - The `max_file_size` option for the File/Image widget can be defined within the global `media_library` option, using `default` as the library name. It applies to all File/Image entry fields, as well as direct uploads to the Asset Library. The option can also be part of the [new `media_libraries` option](#configuring-multiple-media-libraries).
483
+ - The default media library comes with a [built-in image optimizer](#optimizing-images-for-uploaded). With a few lines of configuration, images uploaded by users are automatically converted to WebP format for reduced size,[^199] and it’s also possible to specify a maximum width and/or height.[^200]
482
484
  - The global `media_folder` can be an empty string (or `.` or `/`) if you want to store assets in the root folder.
483
485
  - PDF documents are displayed with a thumbnail image in both the Asset Library and the Select File dialog, making it easier to find the file you’re looking for.[^38]
484
486
  - Assets stored in an entry-relative media folder are displayed in the Asset Library.[^142]
@@ -577,6 +579,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
577
579
  ### Other notes
578
580
 
579
581
  - Make sure you’re using the latest stable version of a modern web browser. Firefox ESR and its derivatives, including Tor Browser and Mullvad Browser, are not officially supported, although they may still work. The [local repository workflow](#working-with-a-local-git-repository) requires Chrome, Edge or another Chromium-based browser.
582
+ - The persistent storage for the Test backend is not yet supported in Safari.
580
583
  - Sveltia CMS requires a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts), meaning it only works with HTTPS, `localhost` or `127.0.0.1` URLs. If you’re running a remote server yourself and the content is served over HTTP, get a TLS certificate from [Let’s Encrypt](https://letsencrypt.org/).
581
584
  - The GitLab backend requires GitLab 16.3 or later.
582
585
  - Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?labels=bug). Bear in mind that undocumented behaviour can easily be overlooked.
@@ -824,7 +827,7 @@ Note that the Translation button on the pane header only translates empty fields
824
827
  If you have upgraded to DeepL API Pro, provide your new Authentication Key:
825
828
 
826
829
  1. Click the Account button in the upper right corner, then click Settings.
827
- 1. Select the Language tab.
830
+ 1. Select the Contents tab.
828
831
  1. Replace your free API key ending with `:fx` with the new paid API key in the DeepL API Authentication Key field.
829
832
  1. Close the Settings dialog.
830
833
 
@@ -943,7 +946,8 @@ media_libraries:
943
946
  default:
944
947
  config:
945
948
  max_file_size: 1024000
946
- # coming soon: image optimizer options
949
+ transformations:
950
+ # See the next section
947
951
  cloudinary:
948
952
  config:
949
953
  cloud_name: YOUR_CLOUD_NAME
@@ -957,6 +961,29 @@ media_libraries:
957
961
  defaultOperations: '/resize/800x600/'
958
962
  ```
959
963
 
964
+ ### Optimizing images for uploaded
965
+
966
+ Ever wanted to prevent end-users from adding huge images? The built-in optimizer in Sveltia CMS helps developers avoid such situations with a simple configuration like this:
967
+
968
+ ```yaml
969
+ media_libraries:
970
+ default:
971
+ config:
972
+ transformations:
973
+ raster_image:
974
+ format: webp # only `webp` is supported
975
+ quality: 85 # default: 85
976
+ width: 2048 # default: original size
977
+ height: 2048 # default: original size
978
+ ```
979
+
980
+ - As [noted above](#configuring-multiple-media-libraries), the `media_libraries` option can be global at the root level of `config.yml`, or field-specific for File/Image widgets.
981
+ - `raster_image` applies to any supported raster image format: `avif`, `bmp`, `gif`, `jpeg`, `png`, `webp`. If you like, you can use a specific format as key instead of `raster_image`.
982
+ - The `width` and `height` options are the maximum width and height, respectively. If an image is larger than the specified dimension, it will be scaled down. Smaller images will not be resized.
983
+ - File processing is a bit slow on Safari because [native WebP encoding](https://caniuse.com/mdn-api_htmlcanvaselement_toblob_type_parameter_webp) is not yet supported. A [third-party library](https://github.com/jamsinclair/jSquash) is used as a fallback.
984
+ - AVIF conversion is not supported at this time because no browser has native encoding support and the library is very slow.
985
+ - We may add more transformation options in the future.
986
+
960
987
  ### Editing data files with a top-level list
961
988
 
962
989
  Sveltia CMS allows you to edit and save a list at the top-level of a data file, without a field name. All you need to do is create a single List field with the new `root` option set to `true`. The configuration below reproduces [this Jekyll data file example](https://jekyllrb.com/docs/datafiles/#example-list-of-members):
@@ -1211,6 +1238,10 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1211
1238
  - Official starter templates for the most popular frameworks, including SvelteKit and Next.js
1212
1239
  - and so much more!
1213
1240
 
1241
+ ## Trivia
1242
+
1243
+ - The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. And now we are completely rewriting it in Svelte. So this is effectively the second time the application has gone through a framework migration.
1244
+
1214
1245
  ## Related links
1215
1246
 
1216
1247
  - Introducing Sveltia CMS: a short technical presentation by [@kyoshino](https://github.com/kyoshino) during the _This Week in Svelte_ online meetup on March 31, 2023 — [recording](https://youtu.be/-YjLubiieYs?t=1660) & [slides](https://docs.google.com/presentation/d/1Wi4ty-1AwOp2-zy7LctmzCV4rrdYPfke9NGhO0DdRdM)
@@ -1619,3 +1650,9 @@ This software is provided “as is” without any express or implied warranty. W
1619
1650
  [^196]: Netlify/Decap CMS [#3057](https://github.com/decaporg/decap-cms/issues/3057) — We use Svelte though.
1620
1651
 
1621
1652
  [^197]: Netlify/Decap CMS [#3457](https://github.com/decaporg/decap-cms/issues/3457), [#3624](https://github.com/decaporg/decap-cms/issues/3624)
1653
+
1654
+ [^198]: Netlify/Decap CMS [#7442](https://github.com/decaporg/decap-cms/issues/7442)
1655
+
1656
+ [^199]: Netlify/Decap CMS [#5419](https://github.com/decaporg/decap-cms/issues/5419), [#7107](https://github.com/decaporg/decap-cms/issues/7107)
1657
+
1658
+ [^200]: Netlify/Decap CMS [#1322](https://github.com/decaporg/decap-cms/issues/1322), [#6442](https://github.com/decaporg/decap-cms/issues/6442)