@sveltia/cms 0.56.5 → 0.58.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
@@ -92,7 +92,7 @@ We loved the concept of Netlify CMS — turning a Git repository into a database
92
92
  Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successors:
93
93
 
94
94
  - [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork, initial commit made in September 2022 — discontinued in September 2024 after doing a great job
95
- - **Sveltia CMS**: a total reboot, started in November 2022, first appeared on GitHub in March 2023
95
+ - **Sveltia CMS**: not a fork but a total reboot, started in November 2022, first appeared on GitHub in March 2023
96
96
  - [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version, [announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as the official successor with a Netlify agency partner taking ownership — mostly inactive
97
97
 
98
98
  Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt and numerous bugs of Netlify CMS, which was launched back in 2015. We are confident that our decision to rebuild the application from scratch was the right and inevitable one, as proven by the [hundreds of improvements](#differentiators) we have already made.
@@ -116,16 +116,16 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
116
116
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
117
117
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
118
118
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
119
- - So far, 165+ of them, or 330+ including duplicates, have been effectively solved in Sveltia CMS
120
- - Target: 200 by GA; 300, or 500 including duplicates, in the future
121
- - 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 a fundamental solution, as well as [discussions](https://github.com/decaporg/decap-cms/discussions)
119
+ - So far, 170+ of them, or 335+ including duplicates, have been effectively solved in Sveltia CMS
120
+ - Target: 200 by GA; 300, or 500 including duplicates, in the future (yes, you read that right)
121
+ - 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 a real solution, as well as [discussions](https://github.com/decaporg/decap-cms/discussions)
122
122
  - 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
123
123
  - Solving [our own issues](https://github.com/sveltia/sveltia-cms/issues)
124
124
  - Implementing our own enhancement ideas for every part of the product
125
125
  - Responding to requests from the maintainer’s clients
126
126
  - Making the code clean and maintainable
127
127
 
128
- ![165 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?2025020215)<br>
128
+ ![170 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250210)<br>
129
129
 
130
130
  ## Differentiators
131
131
 
@@ -135,11 +135,11 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
135
135
 
136
136
  - Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
137
137
  - The maintainer tries to be as responsive as possible. While there are no guarantees, the typical turnaround time for a bug fix is less than 24 hours.
138
- - Offers a modern, intuitive user interface that utilizes the full viewport, inspired in part by the Netlify CMS v3 prototype.[^1][^178]
138
+ - Offers a modern, intuitive user interface that utilizes the full viewport,[^178] inspired in part by the Netlify CMS v3 prototype.[^1]
139
139
  - Immersive dark mode is available.[^2] The UI theme follows the user’s system preference by default and can be changed in the application settings.
140
140
  - Comes with touch device support, such as larger buttons for easier tapping. While the UI is not yet optimized for small screens, it should work well with large tablets like iPad Pro or Pixel Tablet. Mobile support and other optimizations such as swipe navigation are planned after the 1.0 release.
141
141
  - Made with [Svelte](https://svelte.dev/), not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common React application crashes.[^113][^129] Best of all, Svelte offers great performance.
142
- - We develop [our own UI library](https://github.com/sveltia/sveltia-ui) to ensure optimal usability without compromising accessibility.
142
+ - We build [our own UI library](https://github.com/sveltia/sveltia-ui) to ensure optimal usability without compromising accessibility.
143
143
  - The in-app Help menu provides all links to useful resources, including release notes, feedback and support.
144
144
  - Users can personalize the application with various settings, including appearance and language. Developer Mode can also be enabled.
145
145
  - 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]
@@ -147,9 +147,9 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
147
147
  ### Better performance
148
148
 
149
149
  - 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.
150
- - 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.7 MB) and Static CMS (2.6 MB),[^57][^64] even though we haven’t implemented some features yet, but rather added many new features. That’s the power of Svelte + [Vite](https://vite.dev/).
150
+ - 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/).
151
151
  - 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 is underway.
152
- - Sveltia CMS is free of technical debt (except for the Moment.js dependency, which will be replaced by Day.js before GA) and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
152
+ - [No virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
153
153
  - 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]
154
154
  - 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/).
155
155
  - Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern [File System Access API](https://developer.chrome.com/articles/file-system-access/) to read and write files natively through the web browser, rather than using a slow, ad hoc REST API through a proxy server.
@@ -197,7 +197,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
197
197
 
198
198
  ### Better installation
199
199
 
200
- - Sveltia CMS is built with [Svelte](https://svelte.dev/), and we only publish compiled vanilla JavaScript bundles, so there are no React compatibility issues that might prevent developers from upgrading a project.[^177] We haven’t actually integrated React for custom widgets and other features yet, but anyway, no dependencies will be installed when you [install the app with npm](#installing-with-npm).
200
+ - Sveltia CMS is built with [Svelte](https://svelte.dev/), and we only publish compiled vanilla JavaScript bundles, so there are no React compatibility issues that might prevent developers from upgrading a project for many months.[^177] We haven’t actually integrated React for custom widgets and other features yet, but anyway, no dependencies will be installed when you [install the app with npm](#installing-with-npm).
201
201
  - Sveltia CMS also won’t cause peer dependency conflicts due to legacy third-party React UI libraries.[^175] We build the app using [our own Svelte UI library](https://github.com/sveltia/sveltia-ui) to reduce reliance on third-party dependencies.
202
202
  - The [robots `meta` tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag) is automatically added to HTML to prevent the admin page from being indexed by search engines.[^174] Developers are still encouraged to manually add `<meta name="robots" content="noindex">` to `index.html`, as not all crawlers support dynamically added tags. However, our solution should at least work with Google in case you forget to do so.
203
203
  - Some servers and frameworks are known to remove the trailing slash from the CMS URL (`/admin`) depending on the configuration. In such cases, the config file is loaded from a root-relative URL (`/admin/config.yml`) instead of a regular relative URL (`./config.yml` = `/config.yml`) that results in a 404 Not Found error.[^107]
@@ -224,6 +224,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
224
224
  - The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
225
225
  - File collections support multiple files/folders i18n structures.[^87] To enable it, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/about.{{locale}}.json` or `content/pages/{{locale}}/about.json`. For backward compatibility, the global `structure` option only applies to folder collections, and the default i18n structure for file collections remains single file.
226
226
  - The List and Object widgets support the `i18n: duplicate` field configuration so that changes made with these widgets are duplicated between locales.[^7][^68] The `i18n` configuration can normally be used for the subfields.
227
+ - The new `multiple_folders_i18n_root` i18n structure allows to have locale folders below the project root: `<locale>/<folder>/<slug>.<extension>`. [^182]
227
228
  - The `required` field option accepts an array of locale codes in addition to a boolean, making the field required for a subset of locales when i18n support is enabled. For example, if only English is required, you could write `required: [en]`. An empty array is equivalent to `required: false`.
228
229
  - [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure.[^21]
229
230
  - The `{{locale}}` template tag can be used in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language.[^63]
@@ -311,6 +312,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
311
312
  - A long validation error message is displayed in full, without being hidden behind the field label.[^59]
312
313
  - Any links to other entries will work as expected, with the Content Editor being updated for the other.[^100]
313
314
  - In the Boolean and Select widgets, you don’t have to update a value twice to re-enable the Save button after saving an entry.[^139]
315
+ - `data` can be used as a field name without causing an error when saving the entry.[^180]
314
316
 
315
317
  ### Better content preview
316
318
 
@@ -330,7 +332,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
330
332
  - In other words, in Sveltia CMS, `required: false` makes data input optional, but doesn’t make data output optional.
331
333
  - To omit empty optional fields from data output, use `omit_empty_optional_fields: true` in the [data output options](#controlling-data-output). This is useful if you have data type validations that expect `undefined`.[^156]
332
334
  - 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]
333
- - Leading and trailing spaces in text-type field values are automatically removed when you save an entry.[^37]
335
+ - Leading/trailing whitespaces in text-type field values are automatically removed when you save an entry.[^37]
334
336
  - YAML string folding (maximum line width) is disabled, mainly for framework compatibility.[^119]
335
337
  - 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]
336
338
  - Provides JSON/YAML format options as part of the [data output options](#controlling-data-output), including indentation and quotes.[^155][^9]
@@ -341,6 +343,10 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
341
343
  - Boolean
342
344
  - A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error.[^45]
343
345
  - An optional Boolean field with no default value is also saved as `false` by default, rather than nothing.[^46]
346
+ - Code
347
+ - More than 300 languages are available, thanks to [Prism](https://prismjs.com/)’s extensive language support.
348
+ - The language switcher always appears in the user interface, so it’s easy to spot and change the selected language.
349
+ - Code fields under a List field work as expected, saving both code and language.[^181]
344
350
  - Color
345
351
  - The widget doesn’t cause scrolling issues.[^128]
346
352
  - The preview shows both the RGB(A) hex value and the `rgb()` function notation.
@@ -480,7 +486,7 @@ However, 100% feature parity is not planned, and some features are still missing
480
486
  - 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.
481
487
  - The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
482
488
  - The deprecated Date widget will not be supported, as it has already been removed from Decap CMS 3.0. Use the DateTime widget with the `time_format: false` option instead.
483
- - The theme and keymap inline settings of the Code widget will not be supported, and some minor languages may be dropped, as we use the [Prism](https://prismjs.com/)-powered code block functionality in Lexical instead of [CodeMirror](https://codemirror.net/).
489
+ - The theme and keymap inline settings of the Code widget will not be supported, and some languages are dropped, as we use the [Prism](https://prismjs.com/)-powered code block functionality in Lexical instead of [CodeMirror](https://codemirror.net/).
484
490
  - Remark plugins will not be supported, as they are not compatible with our Lexical-based rich text editor.
485
491
  - [Undocumented methods](https://github.com/sveltia/sveltia-cms/blob/c69446da7bb0bab7405be741c0f92850c5dddfa8/src/main.js#L14-L37) exposed on the `window.CMS` object will not be implemented. 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.
486
492
 
@@ -492,18 +498,17 @@ These limitations are expected to be resolved before the 1.0 release scheduled f
492
498
  | --- | --- |
493
499
  | Backends | The [Test backend](https://decapcms.org/docs/test-backend/) needed for our demo site is not yet added. We’ll see if [Azure DevOps](https://decapcms.org/docs/azure-backend/) can also be supported. |
494
500
  | Configuration | Comprehensive config validation is not yet implemented. |
495
- | Localization | The application UI is only available in English and Japanese at this time. Want to be a localizer? See [this README](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md). |
501
+ | Localization | The application UI is only available in English and Japanese at this time. |
496
502
  | Media Libraries | [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) are not yet supported. |
497
503
  | Widgets | [Custom widgets](https://decapcms.org/docs/custom-widgets/) are not yet supported. See the table below for other limitations. |
498
504
  | Customization | [Custom previews](https://decapcms.org/docs/customization/) and [event subscriptions](https://decapcms.org/docs/registering-events/) are not yet supported. |
499
505
 
500
506
  | Widget | Status in Sveltia CMS |
501
507
  | --- | --- |
502
- | [Code](https://decapcms.org/docs/widgets/#code) | Not yet implemented. |
503
508
  | [DateTime](https://decapcms.org/docs/widgets/#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](https://momentjs.com/) 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. |
504
509
  | [File](https://decapcms.org/docs/widgets/#file) / [Image](https://decapcms.org/docs/widgets/#image) | Field-specific media folders (beta) and media library options are not yet supported other than `media_library.config.max_file_size` for the default media library. |
505
510
  | [Map](https://decapcms.org/docs/widgets/#map) | Not yet implemented. |
506
- | [Markdown](https://decapcms.org/docs/widgets/#markdown) | Custom components are not yet supported. There is no language selector yet in the built-in `code-block` component. |
511
+ | [Markdown](https://decapcms.org/docs/widgets/#markdown) | Custom components are not yet supported. |
507
512
 
508
513
  ### Features to be implemented after GA
509
514
 
@@ -515,7 +520,7 @@ Due to the complexity, the following features are planned for after the 1.0 rele
515
520
 
516
521
  ### Compatibility with Static CMS
517
522
 
518
- We plan to provide partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. This README will be updated with more details as our development progresses.
523
+ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. This README will be updated as our development progresses.
519
524
 
520
525
  - Configuration options
521
526
  - Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/decap-migration-guide) to view filters/groups, List widget, etc. while Sveltia CMS follows Netlify/Decap CMS, so you should review your configuration carefully.
@@ -528,7 +533,7 @@ We plan to provide partial compatibility with [Static CMS](https://github.com/St
528
533
  - Widgets
529
534
  - The KeyValue widget is implemented in Sveltia CMS with the same options.
530
535
  - The UUID widget is also implemented, but with different options.
531
- - The `prefix` and `suffix` options for the Boolean, Number and String widgets are implemented as `before_input` and `after_input`, respectively, in Sveltia CMS. Our `prefix` and `suffix` options for the String widget are literally a prefix and suffix to the value.
536
+ - 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.
532
537
  - The `multiple` option for the File and Image widgets will be implemented in Sveltia CMS before GA. ([#10](https://github.com/sveltia/sveltia-cms/issues/10))
533
538
  - Customization
534
539
  - `CMS.registerIcon()` will not be supported, as Sveltia CMS includes the Material Symbols font for [custom collection icons](#using-a-custom-icon-for-a-collection) that doesn’t require manual registration.
@@ -832,12 +837,24 @@ You can disable output of content in selected non-default locales by adding the
832
837
 
833
838
  With the following configuration, you can disable the French and/or German translation while writing in English.
834
839
 
835
- ```diff
836
- i18n:
837
- structure: multiple_files
838
- locales: [en, fr, de]
839
- default_locale: en
840
- + save_all_locales: false
840
+ ```yaml
841
+ i18n:
842
+ structure: multiple_files
843
+ locales: [en, fr, de]
844
+ default_locale: en
845
+ save_all_locales: false # default: true
846
+ ```
847
+
848
+ Alternatively, developers can specify locales to be enabled by default when users create a new entry draft, using the new `initial_locales` option, which accepts a locale list, `default` (default locale only) or `all` (all locales). When this option is used, `save_all_locales` will be `false`.
849
+
850
+ The following example disables German by default, but users can manually enable German if needed. Note that the default locale, in this case English, is always enabled.
851
+
852
+ ```yaml
853
+ i18n:
854
+ structure: multiple_files
855
+ locales: [en, fr, de]
856
+ default_locale: en
857
+ initial_locales: [en, fr]
841
858
  ```
842
859
 
843
860
  ### Using a random ID for an entry slug
@@ -1075,7 +1092,6 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1075
1092
  - Implementing the [remaining Netlify/Decap CMS features](#features-to-be-implemented-after-ga)
1076
1093
  - Tackling even more Netlify/Decap CMS issues, including MDX support,[^122] manual entry sorting,[^125] mobile optimization,[^18] config editor[^10] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc)
1077
1094
  - Exploring features that require server-side implementation, including user management (Netlify Identity alternative), roles,[^23] commits without a GitHub or GitLab account (Git Gateway alternative), post locking (like [WordPress](https://codex.wordpress.org/Post_Locking))[^166] and scheduled posts[^167]
1078
- - Considering further [compatibility with Static CMS](#compatibility-with-static-cms)
1079
1095
  - More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools, etc.
1080
1096
  - AI integrations for image generation and content writing
1081
1097
  - Search enhancements
@@ -1175,7 +1191,7 @@ This software is provided “as is” without any express or implied warranty. W
1175
1191
 
1176
1192
  [^36]: Netlify/Decap CMS [#6325](https://github.com/decaporg/decap-cms/issues/6325)
1177
1193
 
1178
- [^37]: Netlify/Decap CMS [#1481](https://github.com/decaporg/decap-cms/issues/1481)
1194
+ [^37]: Netlify/Decap CMS [#1481](https://github.com/decaporg/decap-cms/issues/1481), [#7398](https://github.com/decaporg/decap-cms/issues/7398)
1179
1195
 
1180
1196
  [^38]: Netlify/Decap CMS [#1984](https://github.com/decaporg/decap-cms/issues/1984)
1181
1197
 
@@ -1451,7 +1467,7 @@ This software is provided “as is” without any express or implied warranty. W
1451
1467
 
1452
1468
  [^174]: Netlify/Decap CMS [#6616](https://github.com/decaporg/decap-cms/issues/6616)
1453
1469
 
1454
- [^175]: Netlify/Decap CMS [#5376](https://github.com/decaporg/decap-cms/issues/5376), [#7380](https://github.com/decaporg/decap-cms/issues/7380)
1470
+ [^175]: Netlify/Decap CMS [#5376](https://github.com/decaporg/decap-cms/issues/5376), [#7203](https://github.com/decaporg/decap-cms/issues/7203), [#7380](https://github.com/decaporg/decap-cms/issues/7380)
1455
1471
 
1456
1472
  [^176]: Netlify/Decap CMS [#6427](https://github.com/decaporg/decap-cms/issues/6427)
1457
1473
 
@@ -1460,3 +1476,9 @@ This software is provided “as is” without any express or implied warranty. W
1460
1476
  [^178]: Netlify/Decap CMS [#2536](https://github.com/decaporg/decap-cms/issues/2536)
1461
1477
 
1462
1478
  [^179]: Netlify/Decap CMS [#1891](https://github.com/decaporg/decap-cms/issues/1891)
1479
+
1480
+ [^180]: Netlify/Decap CMS [#7399](https://github.com/decaporg/decap-cms/issues/7399)
1481
+
1482
+ [^181]: Netlify/Decap CMS [#6254](https://github.com/decaporg/decap-cms/issues/6254)
1483
+
1484
+ [^182]: Netlify/Decap CMS [#4416](https://github.com/decaporg/decap-cms/issues/4416)