@sveltia/cms 0.61.1 → 0.62.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
@@ -110,7 +110,7 @@ While Sveltia CMS is specifically designed to replace legacy Netlify CMS instanc
110
110
 
111
111
  ## Development status
112
112
 
113
- Sveltia CMS is currently in **beta** and version 1.0 (GA) is expected to ship in **early 2025**, in time for the 10th anniversary of Netlify CMS development. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates. See also our [roadmap](#roadmap).
113
+ 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).
114
114
 
115
115
  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:
116
116
 
@@ -118,8 +118,8 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
118
118
  - We even proactively adopt changes suggested in their [pull requests](https://github.com/decaporg/decap-cms/pulls) that may sit in the review queue for a long time
119
119
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
120
120
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
121
- - So far, 175+ of them, or 345+ including duplicates, have been effectively solved in Sveltia CMS
122
- - Target: 200 by GA; 300, or 500 including duplicates, in the future (yes, you read that right)
121
+ - So far, 175+ of them, or 360+ including duplicates, have been effectively solved in Sveltia CMS
122
+ - Target: 200 by GA; 300, or 600 including duplicates, in the future (yes, you read that right)
123
123
  - Issues include everything from feature requests to bug reports and [issues closed as stale](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+%22Closing+as+stale%22) or without an effective solution, as well as [discussions](https://github.com/decaporg/decap-cms/discussions)
124
124
  - Most of the bugs, including annoying crashes, are already solved
125
125
  - Many of their [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) are on our table or already implemented in Sveltia CMS
@@ -151,7 +151,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
151
151
  ### Better performance
152
152
 
153
153
  - Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with any framework or static site generator (SSG) that can load static data files during the build process.
154
- - Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.9 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though we haven’t implemented some features yet, we have added a lot of new features. That’s the power of Svelte + [Vite](https://vite.dev/).
154
+ - Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.9 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though we haven’t implemented [some features](#current-limitations) yet, we have added a lot of new features. That’s the power of Svelte + [Vite](https://vite.dev/).
155
155
  - We have upgraded from Svelte 4 to [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) to further improve performance, including an even smaller bundle size.
156
156
  - [No virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
157
157
  - Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly[^32][^65] (the useless `search` configuration option is therefore ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets.[^14]
@@ -276,11 +276,12 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
276
276
  - `pattern` can be used instead of `value` to provide a regular expression, just like the `view_filters` collection option.[^153]
277
277
  - Enhancements to [summary string transformations](https://decapcms.org/docs/summary-strings/):
278
278
  - Transformations can be used in more places than just the collection `summary`:
279
- - The `slug` collection option[^29]
279
+ - The `slug` and `preview_path` collection options[^29]
280
280
  - The `summary` field option for the List and Object widgets
281
- - Multiple transformations can be chained like `{{title | upper | truncate(20)}}`.
281
+ - The `default` transformation accepts a template tag like `{{fields.slug | default('{{fields.title}}')}}`, making it possible to fall back to a different field value. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/345))
282
282
  - The `date` transformation supports the time zone argument. The only available value is `utc`, which converts a date to UTC. This is useful if the specified DateTime field is local, but you want to force UTC in the entry slug, e.g. `{{date | date('YYYYMMDD-HHmm', 'utc')}}`. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/278#issuecomment-2565313420))
283
283
  - The `date` transformation returns an empty string if an invalid date is given.[^176]
284
+ - Multiple transformations can be chained like `{{title | upper | truncate(20)}}`.
284
285
  - Nested fields (dot notation) can be used in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`.[^62]
285
286
  - Markdown is supported in the `description` collection option.[^79] Bold, italic, strikethrough, code and links are allowed.
286
287
  - The collection `folder` can be an empty string (or `.` or `/`) if you want to store entries in the root folder. This supports a typical VitePress setup.
@@ -494,32 +495,32 @@ However, 100% feature parity is not planned, and some features are still missing
494
495
 
495
496
  ### Features not to be implemented
496
497
 
497
- - **The Bitbucket, Gitea/Forgejo and Git Gateway backends**: For performance reasons. [Git Gateway](https://github.com/netlify/git-gateway) has not been actively maintained since Netlify CMS was abandoned, and it’s known to be slow and prone to rate limit violations. We plan to develop a GraphQL-based high-performance alternative in the future. We may also support the other platforms if their APIs improve to allow the CMS to fetch multiple entries at once.
498
+ - **The Azure, Bitbucket, Gitea/Forgejo and Git Gateway backends**: For performance reasons. [Git Gateway](https://github.com/netlify/git-gateway) has not been actively maintained since Netlify CMS was abandoned, and it’s known to be slow and prone to rate limit violations. We plan to develop a GraphQL-based high-performance alternative in the future. We may also support the other platforms if their APIs improve to allow the CMS to fetch multiple entries at once.
498
499
  - **Netlify Identity Widget**: It’s not useful without Git Gateway, and Netlify Identity itself is now [deprecated](https://www.netlify.com/changelog/deprecation-netlify-identity/). We plan to develop an alternative solution with role support in the future, most likely using [Cloudflare Workers](https://workers.cloudflare.com/) and [Auth.js](https://authjs.dev/).
499
500
  - The deprecated client-side implicit grant for the GitLab backend: It has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
500
501
  - The deprecated Netlify Large Media service: Consider other storage providers.
501
502
  - The deprecated Date widget: It has already been removed from Decap CMS 3.0. Use the DateTime widget with the [`time_format: false` option](#changing-the-input-type-of-a-datetime-field) instead.
503
+ - Some date/time format tokens: [Decap CMS 3.1.1](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1) replaced Moment.js with Day.js, and Sveltia CMS will follow suit soon. Since [Day.js tokens](https://day.js.org/docs/en/display/format) are not 100% compatible with [Moment.js tokens](https://momentjs.com/docs/#/displaying/format/), this could be a breaking change in certain cases.
502
504
  - The theme and keymap inline settings of the Code widget, along with support for some languages: We use the [Prism](https://prismjs.com/)-powered code block functionality in Lexical instead of [CodeMirror](https://codemirror.net/). Prism may be [replaced by Shiki](https://github.com/facebook/lexical/issues/6575) in the future.
503
505
  - Remark plugins: Not compatible with our Lexical-based rich text editor.
504
506
  - [Undocumented methods](https://github.com/sveltia/sveltia-cms/blob/c69446da7bb0bab7405be741c0f92850c5dddfa8/src/main.js#L14-L37) exposed on the `window.CMS` object: This includes custom backends and custom media libraries, if any. We may support these features in the future, but our implementation would likely be incompatible with Netlify/Decap CMS.
505
507
  - An absolute URL for the [`public_folder`](https://decapcms.org/docs/configuration-options/#public-folder) option: Such configuration is not recommended, as stated in the Netlify/Decap CMS document.
506
- - Some date/time format tokens: [Decap CMS 3.1.1](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1) replaced [Moment.js](https://momentjs.com/) with [Day.js](https://day.js.org/), and Sveltia CMS will follow suit soon. Since [Moment.js tokens](https://momentjs.com/docs/#/displaying/format/) and [Day.js tokens](https://day.js.org/docs/en/display/format) are not 100% compatible, this could be a breaking change in certain cases.
507
508
 
508
509
  ### Current limitations
509
510
 
510
- These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release scheduled for early 2025.
511
+ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release.
511
512
 
512
513
  - Comprehensive site config validation
513
514
  - [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
514
- - [Azure](https://decapcms.org/docs/azure-backend/) and [Test](https://decapcms.org/docs/test-backend/) backends (Azure may not be supported for performance reasons)
515
- - Field-specific media folders and media library options for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets other than `max_file_size` for the default media library
515
+ - [Test](https://decapcms.org/docs/test-backend/) backend
516
+ - Field-specific media folders for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
516
517
  - [Map](https://decapcms.org/docs/widgets/#map) widget
517
518
  - [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries
518
519
  - [Custom widgets and custom editor components](https://decapcms.org/docs/custom-widgets/)
519
520
  - [Custom previews](https://decapcms.org/docs/customization/)
520
521
  - [Event subscriptions](https://decapcms.org/docs/registering-events/)
521
522
 
522
- Due to the complexity, the following features are planned for after the 1.0 release. Netlify/Decap CMS has a number of open issues with the collaboration and beta features — we want to implement them the right way.
523
+ Due to the complexity, the following features will be added after the 1.0 release. Netlify/Decap CMS has a number of open issues with the collaboration and beta features — we want to implement them the right way.
523
524
 
524
525
  - [Editorial Workflow](https://decapcms.org/docs/editorial-workflows/)
525
526
  - [Open Authoring](https://decapcms.org/docs/open-authoring/)
@@ -538,7 +539,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
538
539
  - I18n support
539
540
  - The `enforce_required_non_default` i18n option will not be supported. Sveitia CMS enforces required fields in all locales by default. However, the `save_all_locales` or `initial_locales` i18n option allows users to [disable non-default locales](#disabling-non-default-locale-content) if needed. Developers can also specify a subset of locales with the `required` field option, e.g. `required: [en]`.
540
541
  - Widgets
541
- - The date/time format options for the DateTime widget may be incompatible since Static CMS [switched to date-fns](https://staticjscms.netlify.app/docs/decap-migration-guide#dates) while Sveltia CMS continues to use Moment.js (and will soon switch to Day.js). Update your formats accordingly.
542
+ - The date/time format options for the DateTime widget are incompatible since Static CMS [switched to date-fns](https://staticjscms.netlify.app/docs/decap-migration-guide#dates) while Sveltia CMS continues to use Moment.js (and will soon switch to Day.js). Update your formats accordingly.
542
543
  - The KeyValue widget is implemented in Sveltia CMS with the same options.
543
544
  - The UUID widget is also implemented, but with different options.
544
545
  - The `prefix` and `suffix` options for the Boolean, Number and String widgets are implemented as `before_input` and `after_input` in Sveltia CMS, respectively. Our `prefix` and `suffix` options for the String widget are literally a prefix and suffix to the value.
@@ -561,14 +562,18 @@ Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS user
561
562
 
562
563
  As the product evolves, we’ll implement a built-in configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.
563
564
 
564
- Here are some starter kits for popular frameworks created by community members. More to follow!
565
+ Here are some starter kits for popular frameworks created by community members. More to come! (Note: These third-party resources are not necessarily reviewed by the Sveltia CMS team.)
565
566
 
566
- - [Eleventy starter template](https://github.com/danurbanowicz/eleventy-sveltia-cms-starter) by [@danurbanowicz](https://github.com/danurbanowicz)
567
- - [Hugo module](https://github.com/privatemaker/headless-cms) by [@privatemaker](https://github.com/privatemaker)
568
- - [hugolify-sveltia-cms](https://github.com/Hugolify/hugolify-sveltia-cms/) by [@sebousan](https://github.com/sebousan)
569
- - Astro: [astro-sveltia-cms](https://github.com/majesticostudio/astro-sveltia-cms), [astro-starter](https://github.com/zankhq/astro-starter) and [astros](https://github.com/zankhq/astros) by [@zanhk](https://github.com/zanhk)
567
+ - 11ty
568
+ - [Eleventy starter template](https://github.com/danurbanowicz/eleventy-sveltia-cms-starter) by [@danurbanowicz](https://github.com/danurbanowicz)
569
+ - Astro
570
+ - [astro-sveltia-cms](https://github.com/majesticostudio/astro-sveltia-cms), [astro-starter](https://github.com/zankhq/astro-starter) and [astros](https://github.com/zankhq/astros) by [@zanhk](https://github.com/zanhk)
571
+ - [Astro i18n Starter](https://github.com/yacosta738/astro-cms) by [@yacosta738](https://github.com/yacosta738)
572
+ - Hugo
573
+ - [Hugo module](https://github.com/privatemaker/headless-cms) by [@privatemaker](https://github.com/privatemaker)
574
+ - [hugolify-sveltia-cms](https://github.com/Hugolify/hugolify-sveltia-cms/) by [@sebousan](https://github.com/sebousan)
570
575
 
571
- Alternatively, you can probably use one of the [Netlify/Decap CMS templates](https://decapcms.org/docs/start-with-a-template/) and make a quick migration to Sveltia CMS.
576
+ The Netlify/Decap CMS website has more [templates](https://decapcms.org/docs/start-with-a-template/) and [examples](https://decapcms.org/docs/examples/). You can probably use one of them and switch to Sveltia CMS.
572
577
 
573
578
  ### Migration
574
579
 
@@ -665,7 +670,7 @@ Here are the workflow steps and tips:
665
670
 
666
671
  Note that, as with Netlify/Decap CMS, the local repository support in Sveltia CMS doesn’t perform any Git operations. You’ll have to manually fetch, pull, commit and push all changes using a Git client. In the future, we’ll figure out if there’s a way to commit in a browser, because the proxy server actually has the undocumented, experimental `git` mode that creates commits to a local repository.[^131] ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/31))
667
672
 
668
- You will also need to reload the CMS after making changes to the configuration file or retrieving remote updates. This manual work will hopefully be unnecessary once the proposed `FileSystemObserver` API, which is being [implemented in Chromium](https://issues.chromium.org/issues/40105284) behind a flag, becomes available.
673
+ You will also need to reload the CMS after making changes to the configuration file or retrieving remote updates. We plan to eliminate this manual work with the newly available [File System Observer API](https://developer.chrome.com/blog/file-system-observer).
669
674
 
670
675
  If you have migrated from Netlify/Decap CMS and are happy with the local repository workflow of Sveltia CMS, you can remove the `local_backend` property from your configuration and uninstall the proxy server. If you have configured a custom port number with the `.env` file, you can remove it as well.
671
676
 
@@ -909,7 +914,7 @@ Note: The `root` option is ignored if the collection or collection file contains
909
914
 
910
915
  It may be worth mentioning this topic here because the current [Decap CMS doc about the DateTime widget](https://decapcms.org/docs/widgets/#datetime) is unclear. By default, a DateTime field lets users pick both [date and time](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local), but developers can change the input type if needed.
911
916
 
912
- Use `time_format: false` to hide the time picker and make it [date only](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date):
917
+ Use `time_format: false` to hide the time picker and make the input [date only](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date):
913
918
 
914
919
  ```yaml
915
920
  - label: Start Date
@@ -918,7 +923,7 @@ Use `time_format: false` to hide the time picker and make it [date only](https:/
918
923
  time_format: false
919
924
  ```
920
925
 
921
- Use `date_format: false` to hide the date picker and make it [time only](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time):
926
+ Use `date_format: false` to hide the date picker and make the input [time only](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time):
922
927
 
923
928
  ```yaml
924
929
  - label: Start Time
@@ -1511,7 +1516,7 @@ This software is provided “as is” without any express or implied warranty. W
1511
1516
 
1512
1517
  [^181]: Netlify/Decap CMS [#6254](https://github.com/decaporg/decap-cms/issues/6254)
1513
1518
 
1514
- [^182]: Netlify/Decap CMS [#4416](https://github.com/decaporg/decap-cms/issues/4416)
1519
+ [^182]: Netlify/Decap CMS [#4416](https://github.com/decaporg/decap-cms/issues/4416), [#7400](https://github.com/decaporg/decap-cms/pull/7400)
1515
1520
 
1516
1521
  [^183]: Netlify/Decap CMS [#1275](https://github.com/decaporg/decap-cms/issues/1275)
1517
1522
 
@@ -1519,6 +1524,6 @@ This software is provided “as is” without any express or implied warranty. W
1519
1524
 
1520
1525
  [^185]: Netlify/Decap CMS [#6203](https://github.com/decaporg/decap-cms/issues/6203), [#7417](https://github.com/decaporg/decap-cms/issues/7417)
1521
1526
 
1522
- [^186]: Netlify/Decap CMS [#7379](https://github.com/decaporg/decap-cms/issues/7379)
1527
+ [^186]: Netlify/Decap CMS [#3454](https://github.com/decaporg/decap-cms/issues/3454), [#3585](https://github.com/decaporg/decap-cms/issues/3585), [#3651](https://github.com/decaporg/decap-cms/issues/3651), [#3885](https://github.com/decaporg/decap-cms/issues/3885), [#3962](https://github.com/decaporg/decap-cms/issues/3962), [#4037](https://github.com/decaporg/decap-cms/issues/4037), [#4143](https://github.com/decaporg/decap-cms/issues/4143), [#6585](https://github.com/decaporg/decap-cms/issues/6585), [#6664](https://github.com/decaporg/decap-cms/issues/6664), [#6665](https://github.com/decaporg/decap-cms/issues/6665), [#6739](https://github.com/decaporg/decap-cms/issues/6739), [#7243](https://github.com/decaporg/decap-cms/issues/7243), [#7379](https://github.com/decaporg/decap-cms/issues/7379)
1523
1528
 
1524
1529
  [^187]: Netlify/Decap CMS [#1244](https://github.com/decaporg/decap-cms/issues/1244)