@sveltia/cms 0.46.4 → 0.47.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
@@ -40,6 +40,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
40
40
  - [Compatibility](#compatibility)
41
41
  - [Features not to be implemented](#features-not-to-be-implemented)
42
42
  - [Current limitations](#current-limitations)
43
+ - [Other notes](#other-notes)
43
44
  - [Getting started](#getting-started)
44
45
  - [New users](#new-users)
45
46
  - [Migration](#migration)
@@ -96,7 +97,7 @@ While Sveltia CMS is specifically designed to replace legacy Netlify CMS instanc
96
97
  - Emerging as the leading open source offering in the Git-based CMS market
97
98
  - Empowering small businesses and individuals who need a simple, free, yet powerful CMS solution
98
99
  - Extending its capabilities as digital asset management (DAM) software
99
- - Showcasing the vast potential of the Svelte framework
100
+ - Showcasing the power of Svelte and UX engineering
100
101
 
101
102
  ## Development status
102
103
 
@@ -106,9 +107,9 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
106
107
 
107
108
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
108
109
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
109
- - So far, 140+ of them, or 245+ including duplicates, have been effectively solved in Sveltia CMS
110
+ - So far, 140+ of them, or 250+ including duplicates, have been effectively solved in Sveltia CMS
110
111
  - Target: 150 issues by GA, 250 or all relevant and fixable issues in a future release
111
- - Note: Issues include both feature requests and bug reports; we also track [their discussions](https://github.com/decaporg/decap-cms/discussions)
112
+ - 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)
112
113
  - [Let us know](https://github.com/sveltia/sveltia-cms/issues/new) if you have any specific issues you’d like to see solved!
113
114
  - Responding to feedback from clients and regular users
114
115
  - Implementing our own enhancement ideas for every part of the product
@@ -137,10 +138,10 @@ We are working hard to create a **significantly better alternative to Netlify CM
137
138
  - Small footprint: The bundle size is less than 450 KB when minified and brotlied, which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.8 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet. That’s the power of Svelte + Vite.
138
139
  - 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. A full migration to the Runes reactivity API will follow.
139
140
  - Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
140
- - 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], ignoring the `search` configuration option. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
141
+ - 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 ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
141
142
  - Saving entries and assets to GitHub is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
142
143
  - Sorting, filtering and grouping of entries is done instantly without reloading the entire content.
143
- - Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
144
+ - Uses caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
144
145
  - Thumbnails of assets, including videos and PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
145
146
  - No typing lag on input widgets, especially within nested lists and objects[^77].
146
147
 
@@ -152,7 +153,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
152
153
  - When you delete an entry or an asset file, the empty folder that contains it is also deleted, so you don’t have to delete it manually.
153
154
  - Provides a smoother user experience in the Content Editor:
154
155
  - A local backup of an entry draft is automatically created without interruption by a confirmation dialog, which annoys users and can cause a page navigation problem if dismissed[^106]. The backup can then be reliably restored without unexpected overwriting[^85].
155
- - Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
156
+ - Click once (the Save button) instead of twice (Publish > Publish now) to save an entry. Or just hit the `Ctrl+S` (Windows/Linux) or `Command+S` (macOS) key to save your time.
156
157
  - The editor closes automatically when an entry is saved. This behaviour can be changed in the application settings.
157
158
  - Uploading files can be done with drag and drop[^20].
158
159
  - Users can upload multiple files at once to the Asset Library[^5].
@@ -192,7 +193,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
192
193
  - Developers can [disable automatic deployments](#disabling-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
193
194
  - The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
194
195
  - Service status checks are performed frequently and an incident notification is displayed prominently.
195
- - Users can quickly open the source file of an entry or asset in your repository using View on GitHub (or GitLab) under the 3-dot menu.
196
+ - Users can quickly open the source file of an entry or asset in your repository using View on GitHub (or GitLab) under the 3-dot menu when Developer Mode is enabled.
196
197
  - We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
197
198
  - Users won’t get a 404 Not Found error when you sign in to the GitLab backend[^115].
198
199
  - Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
@@ -200,7 +201,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
200
201
 
201
202
  ### Better i18n support
202
203
 
203
- Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect first-class internationalization (i18n) support, as it’s required by clients of maintainer [@kyoshino](https://github.com/kyoshino), who himself was a long-time Japanese localizer for Mozilla and currently lives in a [multicultural city](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
204
+ Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect best-in-class internationalization (i18n) support, as it’s required by clients of maintainer [@kyoshino](https://github.com/kyoshino), who himself was a long-time Japanese localizer for Mozilla and currently lives in a [multicultural city](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
204
205
 
205
206
  - Configuration
206
207
  - The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
@@ -240,6 +241,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
240
241
  - Entry slugs
241
242
  - It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
242
243
  - Slug generation is fail-safe: If a slug cannot be determined from entry content, part of a random UUID is used instead of throwing an error or filling in with arbitrary string field values[^133].
244
+ - If a collection only has the Markdown `body` field, an entry slug will be generated from a header in the `body`, if exists. This supports a typical VitePress setup.
243
245
  - Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
244
246
  - Single quotes (apostrophes) in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
245
247
  - Developers can set the maximum number of characters for an entry slug with the new `slug_length` collection option to avoid deployment errors with Netlify or other platforms[^25].
@@ -249,7 +251,9 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
249
251
  - The collection list displays the number of items in each collection.
250
252
  - A folder collection filter with a boolean value works as expected[^93].
251
253
  - Entry grouping and sorting can work together. For example, it’s possible to group by year and then sort by year if configured properly.
252
- - Hugo’s special `_index.md` files are ignored in folder collections unless the `path` option is configured to end with `_index` and the `extension` is `md`[^120]. You can still manage these files as part of a file collection if necessary.
254
+ - Hugo’s special `_index.md` files, including localized ones like `_index.en.md`, are ignored in folder collections unless the `path` option is configured to end with `_index` and the `extension` is `md`[^120]. You can still manage these files as part of a file collection if necessary.
255
+ - 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.
256
+ - Entries can be listed and edited even if the collection doesn’t have the `title` field. In that case, an entry summary will be generated from a header in the Markdown `body` field, if exists, or from the entry slug. This supports a typical VitePress setup.
253
257
  - If there was an error while parsing an entry file, such as duplicate front matter keys, it won’t show up as a blank entry, and a clear error message will be displayed in the browser console[^121].
254
258
  - Sorting entries by a DateTime field works as expected[^110].
255
259
  - The entry list supports basic Markdown formatting syntax in the titles: bold, italic and code are allowed. HTML character references (entities) are also parsed properly[^69].
@@ -298,6 +302,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
298
302
  - The preview shows both the RGB(A) hex value and the `rgb()` function notation.
299
303
  - DateTime
300
304
  - A DateTime field doesn’t trigger a change in the content draft status when you’ve just started editing a new entry[^90].
305
+ - User’s local time is not saved in UTC unless the `picker_utc` option is `true`[^150].
301
306
  - Hidden
302
307
  - The `default` value supports the following template tags:
303
308
  - `{{locale}}`: The current locale code[^101].
@@ -350,6 +355,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
350
355
  - If the `public_folder` contains `{{slug}}` and you’ve edited a slug field (e.g. `title`) of a new entry after uploading an asset, the updated slug will be used in the saved asset path[^140]. Other dynamic template tags such as `{{filename}}` will also be populated as expected[^141].
351
356
  - List and Object
352
357
  - The `summary` is displayed correctly when it refers to a Relation field[^36] or a simple List field.
358
+ - The `summary` template tags support [summary string transformations](https://decapcms.org/docs/summary-strings/).
353
359
  - Markdown, String and Text
354
360
  - A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
355
361
  - Relation and Select
@@ -390,6 +396,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
390
396
  - Users can add assets using the Quick Add button in the upper right corner of the application.
391
397
  - Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens[^97].
392
398
  - No fatal application crash when uploading assets[^112].
399
+ - `media_folder` can be an empty string (or `.` or `/`) if you want to store assets in the root folder.
393
400
 
394
401
  ### Better customization
395
402
 
@@ -408,11 +415,11 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
408
415
 
409
416
  We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern alternative. It’s ready to be used as a drop-in replacement for Netlify/Decap CMS in some casual use case scenarios with a [single line of code update](#migration).
410
417
 
411
- However, 100% feature parity is not planned, and some features are still missing or will not be added due to deprecation and other factors. Look at the compatibility info below to see if you can migrate now or in the near future.
418
+ However, 100% feature parity is not planned, and some features are still missing or will not be added due to performance, deprecation and other factors. Look at the compatibility info below to see if you can migrate now or in the near future.
412
419
 
413
420
  ### Features not to be implemented
414
421
 
415
- - **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** for performance reasons. We may implement a high-performance Git Gateway alternative in the future. We may also support the other platforms if/when their APIs improve to allow the CMS to fetch multiple files at once.
422
+ - **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** for performance reasons. We may implement a high-performance Git Gateway alternative in the future. We may also support the other platforms if/when their APIs improve to allow the CMS to fetch multiple entries at once.
416
423
  - **The Netlify Identity widget will not be supported**, as it’s not useful without Git Gateway. We may be able to support it in the future if/when a Git Gateway alternative is created.
417
424
  - The deprecated client-side implicit grant for the GitLab backend will not be supported, as it has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
418
425
  - The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
@@ -431,27 +438,29 @@ These limitations are expected to be resolved before or shortly after GA:
431
438
  | Localization | The application UI is only available in English and Japanese at this time. |
432
439
  | Media Libraries | Cloudinary and Uploadcare are not yet supported. |
433
440
  | Workflow | Editorial Workflow and Open Authoring are not yet supported and will be implemented after the 1.0 release. |
434
- | Collections | Nested Collections are not yet supported and will be implemented after the 1.0 release. |
441
+ | Collections | Nested Collections (beta) are not yet supported and will be implemented after the 1.0 release. |
435
442
  | Widgets | Custom widgets are not yet supported. See the table below for other limitations. |
436
443
  | Customizations | Custom previews and event subscriptions are not yet supported. |
437
444
 
438
445
  | Widget | Status in Sveltia CMS |
439
446
  | --- | --- |
440
447
  | Code | Not yet supported. |
441
- | DateTime | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note that [Decap CMS 3.1.1](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1) replaced Moment.js with [Day.js](https://day.js.org/), and [Decap CMS 3.3.0](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.3.0) made other changes to the widget behaviour; we’ll follow these changes soon. |
448
+ | DateTime | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note that [Decap CMS 3.1.1](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1) replaced Moment.js with [Day.js](https://day.js.org/), and [Decap CMS 3.3.0](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.3.0) made other changes to the widget behaviour; we’ll follow these changes where it makes sense. |
442
449
  | 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. |
443
450
  | Map | Not yet supported. |
444
451
  | Markdown | Editor components, including built-in `image` and `code-block` as well as custom components, are not yet supported. |
445
452
 
446
- We also plan to provide partial compatibility with new features added to Static CMS, such as the [KeyValue widget](https://staticjscms.netlify.app/docs/widget-keyvalue).
453
+ ### Other notes
447
454
 
448
- Found a compatibility issue or other missing feature? Let us know by [filing an issue](https://github.com/sveltia/sveltia-cms/issues/new).
455
+ - The GitLab backend requires GitLab 16.3 or later.
456
+ - We plan to provide partial compatibility with now-discontinued Static CMS, such as the [KeyValue widget](https://staticjscms.netlify.app/docs/widget-keyvalue).
457
+ - Found a compatibility issue or other missing feature? Let us know by [filing an issue](https://github.com/sveltia/sveltia-cms/issues/new).
449
458
 
450
459
  ## Getting started
451
460
 
452
461
  ### New users
453
462
 
454
- Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Then migrate to Sveltia CMS as described below.
463
+ Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Make sure you choose the [GitHub](https://decapcms.org/docs/github-backend/) or [GitLab](https://decapcms.org/docs/gitlab-backend/) backend (and ignore the Choosing a Backend page). Then migrate to Sveltia CMS as described below.
455
464
 
456
465
  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.
457
466
 
@@ -466,7 +475,7 @@ Alternatively, you can probably use one of the [Netlify/Decap CMS templates](htt
466
475
 
467
476
  ### Migration
468
477
 
469
- Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub or GitLab backend and don’t have any custom widget, custom preview or plugin, migrating to Sveltia CMS is super easy — it works as a drop-in replacement. Edit `/admin/index.html` to replace the CMS `<script>` tag, and push the change to your repository. Your new `<script>` tag is:
478
+ Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub or GitLab backend and don’t have any unsupported features like custom widgets or nested collections, migrating to Sveltia CMS is super easy — it works as a drop-in replacement. Edit `/admin/index.html` to replace the CMS `<script>` tag, and push the change to your repository. Your new `<script>` tag is:
470
479
 
471
480
  ```html
472
481
  <script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
@@ -492,7 +501,7 @@ That said, we strongly recommend testing your new Sveltia CMS instance first on
492
501
 
493
502
  #### Migrating from Git Gateway backend
494
503
 
495
- Sveltia CMS does not support the Git Gateway backend due to performance limitations. If you don’t care about user management with Netlify Identity, you can use the [GitHub backend](https://decapcms.org/docs/github-backend/) or [GitLab backend](https://decapcms.org/docs/gitlab-backend/) instead. Make sure **you install an OAuth client** on GitHub or GitLab in addition to updating your configuration file. As noted in the document, Netlify is still able to facilitate the auth flow.
504
+ Sveltia CMS does not support the Git Gateway backend due to performance limitations. If you don’t care about user management with Netlify Identity, you can use the [GitHub](https://decapcms.org/docs/github-backend/) or [GitLab](https://decapcms.org/docs/gitlab-backend/) backend instead. Make sure **you install an OAuth client** on GitHub or GitLab in addition to updating your configuration file. As noted in the document, Netlify is still able to facilitate the auth flow.
496
505
 
497
506
  To allow multiple users to edit content, simply invite people to your GitHub repository with the write role assigned.
498
507
 
@@ -536,7 +545,7 @@ If you get an “Authentication Aborted” error when trying to sign in to GitHu
536
545
 
537
546
  ### Working with a local Git repository
538
547
 
539
- Sveltia CMS has simplified the local repository workflow by removing the need for additional configuration (the `local_backend` property) and a proxy server, thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/) available in [some modern browsers](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility).
548
+ Sveltia CMS has simplified the local repository workflow by removing the need for additional configuration (the `local_backend` property) and a proxy server (`netlify-cms-proxy-server` or `decap-server`), thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/) available in [some modern browsers](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility).
540
549
 
541
550
  Basically there are only two differences from Netlify/Decap CMS: you don’t need to run the proxy server, and you need to select your project folder in the browser instead. Here are the detailed steps:
542
551
 
@@ -560,7 +569,7 @@ Keep in mind that, as with Netlify/Decap CMS, the local repository support in Sv
560
569
 
561
570
  Also, at this point, you have to reload the CMS to see the latest content after 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.
562
571
 
563
- If you have migrated from Netlify/Decap CMS and are happy with the local workflow of Sveltia CMS, you can remove the `local_backend` property from your configuration and uninstall the proxy server (`netlify-cms-proxy-server` or `decap-server`). If you have configured a custom port number with the `.env` file, you can remove it as well.
572
+ If you have migrated from Netlify/Decap CMS and are happy with the local 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.
564
573
 
565
574
  ### Enabling local development in Brave
566
575
 
@@ -742,7 +751,7 @@ It’s simple — just specify `{{uuid}}` (full UUID v4), `{{uuid_short}}` (last
742
751
 
743
752
  ### Editing data files with a top-level list
744
753
 
745
- 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 a [Jekyll data file example](https://jekyllrb.com/docs/datafiles/#example-list-of-members):
754
+ 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):
746
755
 
747
756
  ```yaml
748
757
  collections:
@@ -1016,7 +1025,7 @@ This software is provided “as is” without any express or implied warranty. W
1016
1025
 
1017
1026
  [^32]: Netlify/Decap CMS [#302](https://github.com/decaporg/decap-cms/issues/302), [#5549](https://github.com/decaporg/decap-cms/issues/5549)
1018
1027
 
1019
- [^33]: Netlify/Decap CMS [#6513](https://github.com/decaporg/decap-cms/issues/6513), [#7295](https://github.com/decaporg/decap-cms/issues/7295)
1028
+ [^33]: Netlify/Decap CMS [#542](https://github.com/decaporg/decap-cms/issues/542), [#6513](https://github.com/decaporg/decap-cms/issues/6513), [#7295](https://github.com/decaporg/decap-cms/issues/7295)
1020
1029
 
1021
1030
  [^34]: Netlify/Decap CMS [#2138](https://github.com/decaporg/decap-cms/issues/2138), [#5932](https://github.com/decaporg/decap-cms/discussions/5932)
1022
1031
 
@@ -1246,6 +1255,8 @@ This software is provided “as is” without any express or implied warranty. W
1246
1255
 
1247
1256
  [^147]: Netlify/Decap CMS [#3583](https://github.com/decaporg/decap-cms/issues/3583)
1248
1257
 
1249
- [^148]: Netlify/Decap CMS [#531](https://github.com/decaporg/decap-cms/issues/531)
1258
+ [^148]: Netlify/Decap CMS [#531](https://github.com/decaporg/decap-cms/issues/531), [#1282](https://github.com/decaporg/decap-cms/issues/1282), [#1877](https://github.com/decaporg/decap-cms/issues/1877)
1250
1259
 
1251
1260
  [^149]: Netlify/Decap CMS [#13](https://github.com/decaporg/decap-cms/issues/13) — The issue appears to have been closed without a fix being available.
1261
+
1262
+ [^150]: Netlify/Decap CMS [#7319](https://github.com/decaporg/decap-cms/issues/7319)