@sveltia/cms 0.59.1 → 0.60.1

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
@@ -27,6 +27,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
27
27
  - [Better accessibility](#better-accessibility)
28
28
  - [Better security](#better-security)
29
29
  - [Better installation](#better-installation)
30
+ - [Better configuration](#better-configuration)
30
31
  - [Better backend support](#better-backend-support)
31
32
  - [Better i18n support](#better-i18n-support)
32
33
  - [Better collections](#better-collections)
@@ -92,7 +93,7 @@ We loved the concept of Netlify CMS — turning a Git repository into a database
92
93
  Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successors:
93
94
 
94
95
  - [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**: not a fork but a total reboot, started in November 2022, first appeared on GitHub in March 2023
96
+ - **Sveltia CMS**: not a fork but a **complete rewrite** or “total reboot”, started in November 2022, first appeared on GitHub in March 2023
96
97
  - [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
98
 
98
99
  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.
@@ -117,29 +118,31 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
117
118
  - We even work proactively to adopt changes suggested in their [pull requests](https://github.com/decaporg/decap-cms/pulls)
118
119
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
119
120
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
120
- - So far, 170+ of them, or 335+ including duplicates, have been effectively solved in Sveltia CMS
121
+ - So far, 175+ of them, or 340+ including duplicates, have been effectively solved in Sveltia CMS
121
122
  - Target: 200 by GA; 300, or 500 including duplicates, in the future (yes, you read that right)
122
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 a real solution, as well as [discussions](https://github.com/decaporg/decap-cms/discussions)
124
+ - Most of the bugs, including annoying crashes, are already solved
123
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
124
126
  - Solving [our own issues](https://github.com/sveltia/sveltia-cms/issues)
125
127
  - Implementing our own enhancement ideas for every part of the product
126
128
  - Responding to requests from the maintainer’s clients
127
129
  - Making the code clean and maintainable
128
130
 
129
- ![170 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250210)<br>
131
+ ![175 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250226)<br>
130
132
 
131
133
  ## Differentiators
132
134
 
133
- We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of improvements we have made, from the small to the large. Here’s what makes Sveltia CMS different. Look how serious we are!
135
+ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous improvements we have made, from the small to the large. Here’s what makes Sveltia CMS different. Look how serious we are!
134
136
 
135
137
  ### Better UX
136
138
 
137
- - 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.
139
+ - Created and actively 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.
138
140
  - 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.
141
+ - Rapid release delivers new features and enhancements to users more quickly.
139
142
  - Offers a modern, intuitive user interface that utilizes the full viewport,[^178] inspired in part by the Netlify CMS v3 prototype.[^1]
140
- - 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.
143
+ - Provides immersive dark mode.[^2] The UI theme follows the user’s system preference by default and can be changed in the application settings.
141
144
  - 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.
142
- - 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.
145
+ - 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 fatal React application crashes.[^113][^129] Best of all, Svelte offers great performance.
143
146
  - We build [our own UI library](https://github.com/sveltia/sveltia-ui) to ensure optimal usability without compromising accessibility.
144
147
  - The in-app Help menu provides all links to useful resources, including release notes, feedback and support.
145
148
  - Users can personalize the application with various settings, including appearance and language. Developer Mode can also be enabled.
@@ -187,7 +190,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
187
190
 
188
191
  ### Better security
189
192
 
190
- - Avoids vulnerabilities in dependencies through constant updates, [`pnpm audit`](https://pnpm.io/cli/audit), and frequent releases, unlike Netlify/Decap CMS where a number of high severity vulnerabilities are unpatched.[^33]
193
+ - Avoids vulnerabilities in dependencies through constant updates, [`pnpm audit`](https://pnpm.io/cli/audit), and frequent releases, unlike Netlify/Decap CMS where a number of high severity vulnerabilities remain unpatched for a long time.[^33]
191
194
  - Our [local repository workflow](#working-with-a-local-git-repository) doesn’t require a proxy server, reducing an attack surface.[^158]
192
195
  - We have enabled [npm package provenance](https://github.blog/security/supply-chain-security/introducing-npm-package-provenance/).
193
196
  - We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS to prevent any unexpected errors or otherwise insecure configuration.[^108]
@@ -201,6 +204,9 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
201
204
  - 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).
202
205
  - 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.
203
206
  - 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.
207
+
208
+ ### Better configuration
209
+
204
210
  - 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]
205
211
  - Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60]
206
212
 
@@ -219,7 +225,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
219
225
 
220
226
  ### Better i18n support
221
227
 
222
- 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](https://www.mozilla.org/) and currently lives in the [most diverse city in the world](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
228
+ Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect unparalleled 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](https://www.mozilla.org/) and currently lives in the [most diverse city in the world](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
223
229
 
224
230
  - Configuration
225
231
  - The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
@@ -234,7 +240,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
234
240
  - When the `clean_accents` option is enabled for [entry slugs](https://decapcms.org/docs/configuration-options/#slug-type), certain characters, such as German umlauts, will be [transliterated](https://en.wikipedia.org/wiki/Transliteration).[^99]
235
241
  - It’s possible to embed the locale code in an entry by using `widget: hidden` along with `default: '{{locale}}'`.[^101]
236
242
  - User interface
237
- - Eliminates UI confusion: The Preview pane can be displayed without toggling i18n in the Content Editor. Both panes are scrollable. There is no condition where both panes are edited in the same language at the same time.
243
+ - Eliminates UI confusion: The Preview Pane can be displayed without toggling i18n in the Content Editor. Both panes are scrollable. There is no condition where both panes are edited in the same language at the same time.
238
244
  - Users can easily switch between locales while editing by clicking a button instead of a dropdown list when there are less than 5 locales.
239
245
  - Language labels appear in human-readable display names instead of ISO 639 language codes because it’s not easy for everyone to recognize `DE` as German, `NL` as Dutch, `ZH` as Chinese, and so on.
240
246
  - Content editing
@@ -255,12 +261,13 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
255
261
  - Configuration
256
262
  - Provides some new options, including:
257
263
  - `icon`: [Choose a custom icon for each collection](#using-a-custom-icon-for-a-collection).[^3]
258
- - `divider`: [Add dividers to the collection list](#adding-dividers-to-the-collection-list).
259
264
  - `thumbnail`: Specify the field name for a thumbnail displayed on the entry list, like `thumbnail: featuredImage`.[^130]
260
265
  - A nested field can be specified using dot notation, e.g. `heroImage.src`.
261
266
  - A wildcard in the field name is also supported, e.g. `images.*.src`.
262
267
  - Multiple field names can be specified as an array for fallback purpose, e.g. `[thumbnail, cover]`.
263
268
  - If this option is omitted, any non-nested, non-empty Image or File field will be used.[^173]
269
+ - `limit`: Specify the maximum number of entries that can be created in a folder collection.[^185]
270
+ - `divider`: [Add dividers to the collection list](#adding-dividers-to-the-collection-list).
264
271
  - Enhancements to the entry `filter` option for folder collections:
265
272
  - Boolean `value` works as expected.[^93]
266
273
  - `value` accepts `null` to match an undefined field value.
@@ -279,13 +286,13 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
279
286
  - Entry slugs
280
287
  - It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
281
288
  - 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]
289
+ - Users can edit entry slugs via the 3-dot menu in the Content Editor.[^184]
282
290
  - 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.
283
291
  - Entry slug template tags support [transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags.[^29]
284
292
  - Single quotes (apostrophes) in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed.[^52]
285
293
  - The maximum number of characters for an entry slug can be set with the new `slug_length` collection option to avoid deployment errors with Netlify or other platforms.[^25]
286
294
  - Setting the collection `path` doesn’t affect the entry slugs stored with the Relation widget.[^137]
287
295
  - Entry slugs are [localizable](#localizing-entry-slugs).[^80]
288
- - Users can edit entry slugs via the 3-dot menu in the Content Editor.[^184]
289
296
  - Entry listing
290
297
  - [Default sort field and direction](#specifying-default-entry-sort-field-and-direction) can be specified.[^172]
291
298
  - Sorting entries by a DateTime field works as expected.[^110]
@@ -318,11 +325,12 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
318
325
 
319
326
  ### Better content preview
320
327
 
321
- - The Preview pane comes with a minimal default style.[^168] It looks nice without a custom preview style or template.
322
- - For better performance, the Preview pane doesn’t use an `<iframe>`.[^179]
323
- - The Preview pane displays all fields, including each label, making it easier to see which fields are populated.
324
- - When you click on a field in the Preview pane, the corresponding field in the Edit pane is highlighted.[^41] It will be automatically expanded if collapsed.
325
- - The Preview pane won’t cause a scrolling issue.[^136]
328
+ - The Preview Pane comes with a minimal default style.[^168] It looks nice without a custom preview style or template.
329
+ - For better performance, the Preview Pane doesn’t use an `<iframe>`.[^179]
330
+ - The Preview Pane displays all fields, including each label, making it easier to see which fields are populated.
331
+ - When you click on a field in the Preview Pane, the corresponding field in the Edit Pane is highlighted.[^41] It will be automatically expanded if collapsed.
332
+ - The Preview Pane doesn’t cause a scrolling issue.[^136]
333
+ - The Preview Pane doesn’t completely crash with a Minified React error.[^186]
326
334
  - Provides better scroll synchronization between the panes when editing or previewing an entry.[^92]
327
335
  - Developers can hide the preview of a specific field using a new field option: `preview: false`.[^126]
328
336
  - [See below](#better-widgets) for widget-specific enhancements, including support for variable types[^42] and YouTube videos.
@@ -381,7 +389,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
381
389
  - The built-in `image` component allows users to add, edit or remove a link on an image.[^171]
382
390
  - The built-in `code-block` component is implemented just like a blockquote. You can simply convert a normal paragraph into a code block instead of adding a component.
383
391
  - Code in a code block in the editor can be copied as expected.[^165]
384
- - Line breaks are rendered as line breaks in the Preview pane according to GitHub Flavored Markdown (GFM).
392
+ - Line breaks are rendered as line breaks in the Preview Pane according to GitHub Flavored Markdown (GFM).
385
393
  - Number
386
394
  - If the `value_type` option is `int` (default) or `float`, the `required` option is `false`, and the value is not entered, the field will be saved as `null` instead of an empty string.[^157] If `value_type` is anything else, the data type will remain a string.
387
395
  - Object
@@ -392,14 +400,14 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
392
400
  - Field options are displayed with no additional API requests.[^14] The confusing `options_length` option, which defaults to 20, is therefore ignored.[^76]
393
401
  - `slug` can be used for `value_field` to show all available options instead of just one in some situations.[^91]
394
402
  - Template strings with a wildcard like `{{cities.*.name}}` can also be used for `value_field`.[^94]
395
- - `display_fields` is displayed in the Preview pane instead of `value_field`.
403
+ - `display_fields` is displayed in the Preview Pane instead of `value_field`.
396
404
  - The redundant `search_fields` option is not required in Sveltia CMS, as it defaults to `display_fields` (and `value_field`).
397
405
  - A new item created in a referenced collection is immediately available in the options.[^138]
398
406
  - Select
399
407
  - It’s possible to select an option with value `0`.[^56]
400
- - `label` is displayed in the Preview pane instead of `value`.
408
+ - `label` is displayed in the Preview Pane instead of `value`.
401
409
  - String
402
- - When a YouTube video URL is entered in a String field, it appears as an embedded video in the Preview pane. Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
410
+ - When a YouTube video URL is entered in a String field, it appears as an embedded video in the Preview Pane. Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
403
411
  - When a regular URL is entered in a String field, it appears as a link that can be opened in a new browser tab.
404
412
  - Supports the `type` option that accepts `url` or `email` as a value, which will validate the value as a URL or email.
405
413
  - Supports the `prefix` and `suffix` string options, which automatically prepend and/or append the developer-defined value to the user-input value, if it’s not empty.
@@ -413,7 +421,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
413
421
  - A URL can also be entered in the dialog.
414
422
  - Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo.[^8] More stock photo providers will be added in the future.
415
423
  - Users can also simply drag and drop a file onto a File/Image field to attach it without having to open the Select File dialog.
416
- - Large images automatically fit in the Preview pane instead of being displayed at their original size, which can easily exceed the width of the pane.
424
+ - Large images automatically fit in the Preview Pane instead of being displayed at their original size, which can easily exceed the width of the pane.
417
425
  - 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]
418
426
  - List and Object
419
427
  - The `summary` is displayed correctly when it refers to a Relation field[^36] or a simple List field.
@@ -485,7 +493,7 @@ However, 100% feature parity is not planned, and some features are still missing
485
493
  ### Features not to be implemented
486
494
 
487
495
  - **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** 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.
488
- - **Netlify Identity Widget will not be supported**, as it’s not useful without Git Gateway. The [widget](https://github.com/netlify/netlify-identity-widget) has been unmaintained for years, and Netlify no longer officially supports it [according to a Netlify customer](https://github.com/sveltia/sveltia-cms/discussions/284). 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/).
496
+ - **Netlify Identity Widget will not be supported**, as it’s not useful without Git Gateway. The [widget](https://github.com/netlify/netlify-identity-widget) has been unmaintained for years, and Netlify Identity itself is now deprecated according to Netlify customers (see [this](https://github.com/sveltia/sveltia-cms/discussions/284) and [this](https://github.com/decaporg/decap-cms/discussions/7419)). 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/).
489
497
  - 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.
490
498
  - The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
491
499
  - 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.
@@ -533,7 +541,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
533
541
  - The `logo_link` global option will not be supported. Use `display_url` or `site_url` instead.
534
542
  - The `yaml` global option will not be supported, as Sveltia CMS doesn’t expose the `yaml` library options directly for forward compatibility reasons. However, we do have some [data output options](#controlling-data-output), including YAML indentation and quotes.
535
543
  - I18n support
536
- - 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` 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]`.
544
+ - 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]`.
537
545
  - Widgets
538
546
  - The KeyValue widget is implemented in Sveltia CMS with the same options.
539
547
  - The UUID widget is also implemented, but with different options.
@@ -711,7 +719,7 @@ collections:
711
719
 
712
720
  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.
713
721
 
714
- Rather, if you’d like to add all the media files for a collection in one single folder, specify both `media_folder` and `public_folder` instead of leaving them empty. The trick is to use a **project relative path** starting with a `/` for `media_folder` like the example below. You can try this with Netlify/Decap CMS first if you prefer.
722
+ Rather, if you’d like to add all the media files for a collection in one single folder, specify both `media_folder` and `public_folder` instead of leaving them empty. The trick is to use a **project relative path starting with a slash** for `media_folder` like the example below. You can try this with Netlify/Decap CMS first if you prefer.
715
723
 
716
724
  ```diff
717
725
  media_folder: static/media
@@ -722,7 +730,7 @@ Rather, if you’d like to add all the media files for a collection in one singl
722
730
  label: Products
723
731
  create: true
724
732
  folder: data/products/
725
- + media_folder: /static/media/products # start with a slash
733
+ + media_folder: /static/media/products # make sure to append a slash
726
734
  + public_folder: /media/products
727
735
  ```
728
736
 
@@ -1490,3 +1498,7 @@ This software is provided “as is” without any express or implied warranty. W
1490
1498
  [^183]: Netlify/Decap CMS [#1275](https://github.com/decaporg/decap-cms/issues/1275)
1491
1499
 
1492
1500
  [^184]: Netlify/Decap CMS [#377](https://github.com/decaporg/decap-cms/issues/377)
1501
+
1502
+ [^185]: Netlify/Decap CMS [#6203](https://github.com/decaporg/decap-cms/issues/6203), [#7417](https://github.com/decaporg/decap-cms/issues/7417)
1503
+
1504
+ [^186]: Netlify/Decap CMS [#7379](https://github.com/decaporg/decap-cms/issues/7379)