@sveltia/cms 0.77.1 → 0.78.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
@@ -46,6 +46,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
46
46
  - [Current limitations](#current-limitations)
47
47
  - [Compatibility with Static CMS](#compatibility-with-static-cms)
48
48
  - [Framework support](#framework-support)
49
+ - [Backend support](#backend-support)
49
50
  - [Browser support](#browser-support)
50
51
  - [Other notes](#other-notes)
51
52
  - [Getting started](#getting-started)
@@ -76,6 +77,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
76
77
  - [Disabling stock assets](#disabling-stock-assets)
77
78
  - [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
78
79
  - [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
80
+ - [Rendering soft line breaks as hard line breaks in Markdown](#rendering-soft-line-breaks-as-hard-line-breaks-in-markdown)
79
81
  - [Controlling data output](#controlling-data-output)
80
82
  - [Disabling automatic deployments](#disabling-automatic-deployments)
81
83
  - [Setting up Content Security Policy](#setting-up-content-security-policy)
@@ -130,8 +132,9 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
130
132
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
131
133
  - So far, 210+ issues, or 420+ if including duplicates, have been effectively solved in Sveltia CMS
132
134
  - Target:
133
- - 200 issues, or 400 if including duplicates, by GA (we did it!)
135
+ - 200 issues, or 400 if including duplicates, by GA We did it! 🎉
134
136
  - 350 issues, or 700 if including duplicates, in the future
137
+ - or everything that’s relevant, fixable and worthwhile 💪
135
138
  - 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) and stalled [pull requests](https://github.com/decaporg/decap-cms/pulls)
136
139
  - Most of the bugs, including annoying crashes, are already solved
137
140
  - 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
@@ -148,7 +151,7 @@ Netlify/Decap CMS users will definitely be pleased and surprised by the numerous
148
151
 
149
152
  ### Better UX
150
153
 
151
- - 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.
154
+ - Created and actively maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design, marketing and problem solving. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
152
155
  - The maintainer tries to respond to bug reports as quickly as possible. While there are no guarantees, the typical turnaround time for a bug fix is less than 24 hours.
153
156
  - Frequent releases deliver new features and enhancements to users faster. Most of our minor [releases](https://github.com/sveltia/sveltia-cms/releases) address one or more Netlify/Decap CMS issues, giving you even more reasons to switch from the legacy predecessor.
154
157
  - Offers a modern, intuitive user interface that utilizes the full viewport,[^178] inspired in part by the Netlify CMS v3 prototype.[^1][^211][^212][^213][^214]
@@ -174,6 +177,7 @@ Netlify/Decap CMS users will definitely be pleased and surprised by the numerous
174
177
  - Uses caching, lazy loading and infinite scrolling techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
175
178
  - 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][^38]
176
179
  - No typing lag on input widgets, especially within nested lists and objects.[^77]
180
+ - The entry preview doesn’t use an `<iframe>` because it’s a performance overhead.[^179]
177
181
 
178
182
  ### Better productivity
179
183
 
@@ -236,9 +240,10 @@ Netlify/Decap CMS users will definitely be pleased and surprised by the numerous
236
240
  - 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.
237
241
  - We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
238
242
  - Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
243
+ - Our Gitea backend is high-performing because it retrieves multiple entries simultaneously. It also won’t cause 400 Bad Request errors due to the presence of `DRAFT_MEDIA_FILES` in a file path.[^222]
239
244
  - Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
240
245
  - Developers can select the local and remote backends while working on a local server.
241
- - The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194] Persistent storage works with all modern browsers except Safari.
246
+ - The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194] The persistent storage support works with all modern browsers [except Safari](https://bugs.webkit.org/show_bug.cgi?id=254726).
242
247
 
243
248
  ### Better i18n support
244
249
 
@@ -375,6 +380,10 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
375
380
 
376
381
  ### Better widgets
377
382
 
383
+ Sveltia CMS supports all [built-in widgets](https://decapcms.org/docs/widgets/) available in Netlify/Decap CMS except Map. We have made significant improvements to these widgets while adding some new ones. The remaining Map widget will be added soon.
384
+
385
+ Note: The Date widget has been deprecated in Netlify CMS and removed from both Decap CMS and Sveltia CMS in favour of the DateTime widget, as noted in the [Compatibility](#compatibility) section.
386
+
378
387
  - Boolean
379
388
  - A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error.[^45]
380
389
  - An optional Boolean field with no default value is also saved as `false` by default, rather than nothing.[^46]
@@ -404,7 +413,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
404
413
  - A required List field with no subfield or value is marked as invalid.[^43] No need to set the `min` and `max` options for the `required` option to work.
405
414
  - An optional List field with no subfield or value is saved as an empty array, rather than nothing.[^44]
406
415
  - An optional List field won’t populate an item by default when the subfield has the `default` value.[^162]
407
- - A simple list field with no subfields is displayed as a multiline text field,[^219] where users can use spaces[^50] and commas[^220] for list items. A comma is no longer treated as a list delimiter.
416
+ - A simple List field with no subfields is displayed as a multiline text field,[^219] where users can use spaces[^50] and commas[^220] for list items. A comma is no longer treated as a list delimiter.
408
417
  - Users can preview variable types without having to register a preview template.[^42]
409
418
  - It’s possible to omit `fields` in a variable type object.[^163] In that case, only the `typeKey` (default: `type`) is saved in the output.
410
419
  - A collapsed List field will not display a programmatic summary like `List [ Map { "key": "value" } ]` if the `summary` option is not set.[^183]
@@ -419,7 +428,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
419
428
  - 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.
420
429
  - Code in a code block in the editor can be copied as expected.[^165]
421
430
  - Language-annotated code block doesn’t trigger unsaved changes.[^189]
422
- - Line breaks are rendered as line breaks in the Preview Pane according to GitHub Flavored Markdown (GFM).
431
+ - Soft line breaks are [rendered as hard line breaks](#rendering-soft-line-breaks-as-hard-line-breaks-in-markdown) in the Preview Pane.
423
432
  - Number
424
433
  - 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.
425
434
  - Object
@@ -432,9 +441,10 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
432
441
  - Template strings with a wildcard like `{{cities.*.name}}` can also be used for `value_field`.[^94]
433
442
  - `display_fields` is displayed in the Preview Pane instead of `value_field`.
434
443
  - The redundant `search_fields` option is optional in Sveltia CMS, as it defaults to `display_fields`, `value_field` or the collection’s `identifier_field`, which is `title` by default.
435
- - The `value_field` option is also optional in Sveltia CMS, as it defaults to entry slugs (`{{slug}}`).
444
+ - The `value_field` option is also optional in Sveltia CMS, as it defaults to `{{slug}}` (entry slugs).
436
445
  - A new item created in a referenced collection is immediately available in the options.[^138]
437
- - It’s possible to refer to a list field with the `field` option, which produces a single subfield but does not output the subfield `name` in the data, using the `value_field: cities.*.name` syntax. ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/400))
446
+ - A referenced DateTime field value is displayed in the specified format.[^221]
447
+ - It’s possible to refer to a List field with the `field` option, which produces a single subfield but does not output the subfield `name` in the data, using the `value_field: cities.*.name` syntax. ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/400))
438
448
  - Select
439
449
  - It’s possible to select an option with value `0`.[^56]
440
450
  - `label` is displayed in the Preview Pane instead of `value`.
@@ -535,7 +545,7 @@ However, 100% feature parity is not planned, and some features are still missing
535
545
 
536
546
  ### Features not to be implemented
537
547
 
538
- - **Azure, Bitbucket and Forgejo backends**: For performance reasons. We may support these platforms if their APIs improve to allow the CMS to fetch multiple entries at once. Our [planned Gitea backend](https://github.com/sveltia/sveltia-cms/issues/198) is incompatible with Forgejo because it would use a new efficient API method. [Forgejo support](https://github.com/sveltia/sveltia-cms/issues/381) will not be added until they implement an equivalent.
548
+ - **Azure, Bitbucket and Forgejo backends**: For performance reasons. We may support these platforms if their APIs improve to allow the CMS to fetch multiple entries at once. Our [Gitea backend](https://github.com/sveltia/sveltia-cms/issues/198) is incompatible with Forgejo because it uses a new efficient API method. [Forgejo support](https://github.com/sveltia/sveltia-cms/issues/381) will not be added until they implement an equivalent.
539
549
  - **Git Gateway backend**: Also 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.
540
550
  - **Netlify Identity Widget**: It’s not useful without Git Gateway, and the Netlify Identity service 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/).
541
551
  - 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.
@@ -566,7 +576,6 @@ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are
566
576
 
567
577
  - Comprehensive site config validation
568
578
  - [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
569
- - [Gitea backend](https://decapcms.org/docs/gitea-backend/) ([#198](https://github.com/sveltia/sveltia-cms/issues/198))
570
579
  - [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
571
580
  - Field-specific media folders (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
572
581
  - [Map](https://decapcms.org/docs/widgets/#map) widget
@@ -610,7 +619,12 @@ While Sveltia CMS is built with Svelte, the application is **framework-agnostic*
610
619
 
611
620
  So you can use the CMS with any framework or static site generator (SSG) that can load static files during the build process, including but not limited to Astro, Eleventy, Hugo, Jekyll, Next.js, SvelteKit and VitePress.
612
621
 
613
- We have added support for features used by certain frameworks and i18n libraries, such as [index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) and [slug localization](#localizing-entry-slugs) for Hugo, i18n support for Astro and Zola, and [some enhancements](https://github.com/sveltia/sveltia-cms/issues/230) for VitePress. [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=feature) if your framework has specific requirements.
622
+ We have added support for features and file structures used in certain frameworks and i18n libraries, such as [index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) and [slug localization](#localizing-entry-slugs) for Hugo, i18n support for Astro and Zola, and [some enhancements](https://github.com/sveltia/sveltia-cms/issues/230) for VitePress. [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=feature) if your framework has specific requirements.
623
+
624
+ ### Backend support
625
+
626
+ - The GitLab backend requires GitLab 16.3 or later.
627
+ - The Gitea backend requires Gitea 1.24 or later. It’s not compatible with Forgejo as it uses a new efficient API method that Forgejo does not support yet.
614
628
 
615
629
  ### Browser support
616
630
 
@@ -618,12 +632,11 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
618
632
 
619
633
  - The [local repository workflow](#working-with-a-local-git-repository) requires a Chromium-based browser, including Chrome, Edge and Brave.
620
634
  - Safari: The Test backend doesn’t save changes locally; [image optimization](#optimizing-images-for-upload) is slower than in other browsers.
621
- - Firefox ESR and its derivatives, including Tor Browser and Mullvad Browser, are not officially supported, although they may still work.
635
+ - Firefox Extended Support Release (ESR) and its derivatives, including Tor Browser and Mullvad Browser, are not officially supported, although they may still work.
622
636
 
623
637
  ### Other notes
624
638
 
625
639
  - Sveltia CMS requires a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts), meaning it only works with HTTPS, `localhost` or `127.0.0.1` URLs. If you’re running a remote server yourself and the content is served over HTTP, get a TLS certificate from [Let’s Encrypt](https://letsencrypt.org/).
626
- - The GitLab backend requires GitLab 16.3 or later.
627
640
 
628
641
  ## Getting started
629
642
 
@@ -1118,6 +1131,22 @@ Use `date_format: false` to hide the date picker and make the input [time only](
1118
1131
 
1119
1132
  We understand that this configuration may be a bit confusing, but it’s necessary to maintain backward compatibility with Netlify CMS. We plan to improve the widget options and introduce new input types: [month](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month) and [week](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week).
1120
1133
 
1134
+ ### Rendering soft line breaks as hard line breaks in Markdown
1135
+
1136
+ This tip is not really specific to Sveltia CMS, but some developers have asked the maintainer about it:
1137
+
1138
+ In the Markdown editor, pressing `Shift+Enter` inserts a [soft line break](https://spec.commonmark.org/0.31.2/#soft-line-breaks) (`\n`). We can’t change the behaviour to add a [hard line break](https://spec.commonmark.org/0.31.2/#hard-line-breaks) (`<br>`) — it’s a limitation of the underlying [Lexical](https://lexical.dev/) framework. However, if you look at the preview, you may notice that soft line breaks are rendered as hard line breaks. That’s because the preview is using the [Marked](https://github.com/markedjs/marked) library with the [`breaks` option](https://marked.js.org/using_advanced#options) enabled, which mimics how comments are rendered on GitHub.
1139
+
1140
+ Chances are the Markdown parser you use for your frontend can do the same:
1141
+
1142
+ - [markdown-it](https://github.com/markdown-it/markdown-it) (used in Eleventy and VitePress) also has the `breaks` option
1143
+ - [remarkable](https://github.com/jonschlinkert/remarkable) also has the `breaks` option
1144
+ - [Showdown](https://github.com/showdownjs/showdown) has the `simpleLineBreaks` option
1145
+ - [goldmark](https://github.com/yuin/goldmark/) (used in Hugo) has the `html.WithHardWraps` option
1146
+ - [kramdown](https://github.com/gettalong/kramdown) (used in Jekyll) has the `hard_wrap` option with the GFM parser
1147
+ - [remark](https://github.com/remarkjs/remark) (used in Astro) offers a [plugin](https://github.com/remarkjs/remark-breaks)
1148
+ - [micromark](https://github.com/micromark/micromark) clarifies it doesn’t have such an option and recommends alternatives
1149
+
1121
1150
  ### Controlling data output
1122
1151
 
1123
1152
  Sveltia CMS supports some [data output](#better-data-output) options, including JSON/YAML formatting preferences, at the root level of the configuration file. The default options are listed below:
@@ -1125,6 +1154,7 @@ Sveltia CMS supports some [data output](#better-data-output) options, including
1125
1154
  ```yaml
1126
1155
  output:
1127
1156
  omit_empty_optional_fields: false
1157
+ encode_file_path: false # true to URL-encode file paths for FIle/Image fields
1128
1158
  json:
1129
1159
  indent_style: space # or tab
1130
1160
  indent_size: 2
@@ -1284,7 +1314,7 @@ A Release Notes link will now appear under the Account menu with the current app
1284
1314
 
1285
1315
  While we don’t have dedicated developer/user support resources, you can post [quick questions](https://github.com/sveltia/sveltia-cms/discussions/new?category=q-a) on the [Discussions](https://github.com/sveltia/sveltia-cms/discussions) page of our GitHub repository. [Feedback](https://github.com/sveltia/sveltia-cms/discussions/new?category=ideas) is also welcome, but please check the [Compatibility](#compatibility) and [Roadmap](#roadmap) sections of this README before starting a new discussion — your idea may already be covered.
1286
1316
 
1287
- Hop on [our Discord server](https://discord.gg/5hwCGqup5b) for casual chat.
1317
+ Join us on [Discord](https://discord.gg/5hwCGqup5b) or ping us on [Bluesky](https://bsky.app/profile/sveltiacms.app) for a casual chat.
1288
1318
 
1289
1319
  As described throughout this README, Sveltia CMS is being built as a replacement for Netlify/Decap CMS. At this point, we assume that most developers and users are moving from the other product. We are happy to help you migrate, but **we cannot help you set up Sveltia CMS from scratch** through our free support channels.
1290
1320
 
@@ -1300,7 +1330,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1300
1330
 
1301
1331
  Due Q4 2025
1302
1332
 
1303
- - Enhanced [compatibility with Netlify/Decap CMS](#compatibility)
1333
+ - Enhanced [compatibility with Netlify/Decap CMS](#current-limitations)
1304
1334
  - Tackling some more Netlify/Decap CMS issues
1305
1335
  - Accessibility audit
1306
1336
  - [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
@@ -1492,7 +1522,7 @@ This software is provided “as is” without any express or implied warranty. W
1492
1522
 
1493
1523
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
1494
1524
 
1495
- [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470)
1525
+ [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480)
1496
1526
 
1497
1527
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
1498
1528
 
@@ -1580,7 +1610,7 @@ This software is provided “as is” without any express or implied warranty. W
1580
1610
 
1581
1611
  [^116]: Netlify/Decap CMS [#3431](https://github.com/decaporg/decap-cms/issues/3431)
1582
1612
 
1583
- [^117]: Netlify/Decap CMS [#3562](https://github.com/decaporg/decap-cms/issues/3562), [#6215](https://github.com/decaporg/decap-cms/issues/6215)
1613
+ [^117]: Netlify/Decap CMS [#3562](https://github.com/decaporg/decap-cms/issues/3562), [#6215](https://github.com/decaporg/decap-cms/issues/6215), [#7479](https://github.com/decaporg/decap-cms/issues/7479)
1584
1614
 
1585
1615
  [^118]: Netlify/Decap CMS [#7267](https://github.com/decaporg/decap-cms/issues/7267)
1586
1616
 
@@ -1787,3 +1817,7 @@ This software is provided “as is” without any express or implied warranty. W
1787
1817
  [^219]: Netlify/Decap CMS [#3018](https://github.com/decaporg/decap-cms/issues/3018)
1788
1818
 
1789
1819
  [^220]: Netlify/Decap CMS [#2153](https://github.com/decaporg/decap-cms/issues/2153)
1820
+
1821
+ [^221]: Netlify/Decap CMS [#3421](https://github.com/decaporg/decap-cms/issues/3421)
1822
+
1823
+ [^222]: Netlify/Decap CMS [#7281](https://github.com/decaporg/decap-cms/issues/7281) — The issue was closed, but the attached PR is not yet merged.