@sveltia/cms 0.100.2 → 0.101.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
@@ -262,7 +262,7 @@ The [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapc
262
262
  - The GitLab backend supports Git LFS ([documentation](https://docs.gitlab.com/topics/git/lfs/)).[^231]
263
263
  - Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
264
264
  - Our Gitea/Forgejo backend is high-performing because it retrieves multiple entries at once. It also supports Git LFS ([documentation](https://docs.gitea.com/administration/git-lfs-setup)). Additionally, the backend won’t cause 400 Bad Request errors due to the presence of `DRAFT_MEDIA_FILES` in file paths.[^222]
265
- - Users can sign in directly with a Git-based backend using a personal access token (PAT) instead of going through the regular OAuth flow.[^258] To do so, click the small arrow button next to the Sign In button, and select Use Personal Access Token.
265
+ - Users can sign in directly with a Git-based backend using a personal access token (PAT) instead of going through the regular OAuth flow.[^258]
266
266
  - The OAuth access token is automatically renewed when using the GitLab or Gitea/Forgejo backend with PKCE authorization.[^224] Token renewal for other backend configurations will be implemented later.
267
267
  - Features the all-new [local repository workflow](#working-with-a-local-git-repository) that boosts DX. See the [productivity section](#better-productivity) above.
268
268
  - Developers can select the local and remote backends while working on a local server.
@@ -377,7 +377,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
377
377
  - Required fields, not optional fields, are marked for efficient data entry.
378
378
  - Users can revert changes to all fields or a specific field.
379
379
  - If you revert changes and there are no unsaved changes, the Save button is disabled as expected.[^118]
380
- - The new `readonly` field option makes the field read-only. This is useful when a `default` value is provided and the field should not be editable by users.[^223]
380
+ - The new `readonly` field option makes the field read-only. This is useful when a `default` value is provided and the field should not be editable by users.[^223] The option defaults to `false` except for the UUID widget, where it defaults to `true`.
381
381
  - Fields with validation errors are automatically expanded if they are part of nested, collapsed objects.[^40]
382
382
  - A full regular expression, including flags, can be used for the widget `pattern` option.[^82] For example, if you want to allow 280 characters or less in a multiline text field, you could write `/^.{0,280}$/s` (but you can now use the `maxlength` option instead.)
383
383
  - A long validation error message is displayed in full, without being hidden behind the field label.[^59]
@@ -412,7 +412,6 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
412
412
  - A standard time is formatted as `HH:mm:ss` instead of `HH:mm` for framework compatibility.
413
413
  - 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]
414
414
  - Provides JSON/YAML format options as part of the [data output options](#controlling-data-output), including indentation and quotes.[^155][^9]
415
- - The `yaml_quote` collection option added in [v0.5.10](https://github.com/sveltia/sveltia-cms/releases/tag/v0.5.10) is now deprecated and will be removed in v1.0.0. `yaml_quote: true` is equivalent to `quote: double` in the new YAML format options.
416
415
  - Front matter injection is impossible through the `body` field.[^268]
417
416
 
418
417
  ### Better widgets
@@ -539,7 +538,6 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
539
538
  - In addition to [generating UUIDs for entry slugs](#using-a-random-id-for-an-entry-slug), Sveltia CMS supports the proposed `uuid` widget with the following properties:[^12]
540
539
  - `prefix`: A string to be prepended to the value. Default: an empty string.
541
540
  - `use_b32_encoding`: Whether to encode the value with Base32. Default: `false`.
542
- - `read_only`: Whether to make the field read-only. Default: `true`.
543
541
 
544
542
  ### Better asset management
545
543
 
@@ -661,7 +659,7 @@ Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/dec
661
659
  - The `logo_link` global option will not be supported. Use `display_url` or `site_url` instead.
662
660
  - The `yaml` global option will not be supported, as Sveltia CMS doesn’t expose the underlying `yaml` library options for forward compatibility reasons. However, we do have some [data output options](#controlling-data-output), including YAML indentation and quotes.
663
661
  - I18n support
664
- - 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]`.
662
+ - The `enforce_required_non_default` i18n option will not be supported. Sveitia CMS enforces required fields in all locales by default. However, the `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]`.
665
663
  - Widgets
666
664
  - The date/time format options for the DateTime widget are **not compatible** since Static CMS [switched to date-fns](https://staticjscms.netlify.app/docs/decap-migration-guide#dates) while Sveltia CMS continues to use Moment.js (and will soon switch to Day.js). Update your formats accordingly.
667
665
  - The [KeyValue widget](#new-widgets) is implemented in Sveltia CMS with the same options.
@@ -693,10 +691,18 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
693
691
  - Safari: The Test backend doesn’t save changes locally; [image optimization](#optimizing-images-for-upload) is slower than in other browsers.
694
692
  - Firefox Extended Support Release (ESR) and its derivatives, including Tor Browser and Mullvad Browser, are not officially supported, although they may still work.
695
693
 
694
+ ### Deprecations
695
+
696
+ These options are deprecated and will be removed in Sveltia CMS v1.0:
697
+
698
+ - The `automatic_deployments` backend option. Use the new [`skip_ci` option](#disabling-automatic-deployments) instead, which is more intuitive. `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments: true` is equivalent to `skip_ci: false`.
699
+ - The `save_all_locales` i18n option. Use the [`initial_locales` option](#disabling-non-default-locale-content) instead, which provides more flexibility. `save_all_locales: false` is equivalent to `initial_locales: all`.
700
+ - The `yaml_quote` collection option. `yaml_quote: true` is equivalent to `quote: double` in the [new YAML format options](#controlling-data-output).
701
+ - The `read_only` UUID widget option. Use the `readonly` common field option instead, which defaults to `true` for the UUID widget.
702
+
696
703
  ### Other notes
697
704
 
698
705
  - 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/).
699
- - Some options added during the beta period may be changed or removed when the product reaches GA. While we’ll try to minimize breaking changes, please be aware that some of your configuration may need to be updated.
700
706
 
701
707
  ## Getting started
702
708
 
@@ -1185,19 +1191,9 @@ i18n:
1185
1191
 
1186
1192
  ### Disabling non-default locale content
1187
1193
 
1188
- You can disable output of content in selected non-default locales by adding the `save_all_locales` property to the top-level or collection-level `i18n` configuration. Then you’ll find “Disable (locale name)” in the three-dot menu in the top right corner of the Content Editor. This is useful if the translation isn’t ready yet, but you want to publish the default locale content first.
1189
-
1190
- With the following configuration, you can disable the French and/or German translation while writing in English.
1191
-
1192
- ```yaml
1193
- i18n:
1194
- structure: multiple_files
1195
- locales: [en, fr, de]
1196
- default_locale: en
1197
- save_all_locales: false # default: true
1198
- ```
1194
+ Developers can specify locales to be enabled by default when users create a new entry draft, using the `initial_locales` i18n option, which accepts a locale list, `default` (default locale only) or `all` (all locales).
1199
1195
 
1200
- 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). The default locale is always enabled, even if it’s excluded from `initial_locales`. When this option is used, `save_all_locales` is deemed `false`.
1196
+ The default locale is always enabled, even if it’s excluded from `initial_locales`, while other locales can be enabled or disabled by users in the Content Editor through the three-dot menu in the top right corner, if this i18n option is defined.
1201
1197
 
1202
1198
  The following example disables German by default, but users can manually enable it if needed. Users can also disable French, which is enabled by default.
1203
1199
 
@@ -1523,23 +1519,23 @@ You may already have a CI/CD tool set up on your Git repository to automatically
1523
1519
 
1524
1520
  With Sveltia CMS, you can disable automatic deployments by default and manually trigger deployments at your convenience. This is done by adding the `[skip ci]` prefix to commit messages, the convention supported by [GitHub Actions](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs), [GitLab CI/CD](https://docs.gitlab.com/ee/ci/pipelines/#skip-a-pipeline), [CircleCI](https://circleci.com/docs/skip-build/#skip-jobs), [Travis CI](https://docs.travis-ci.com/user/customizing-the-build/#skipping-a-build), [Netlify](https://docs.netlify.com/site-deploys/manage-deploys/#skip-a-deploy), [Cloudflare Pages](https://developers.cloudflare.com/pages/platform/branch-build-controls/#skip-builds) and others. Here are the steps to use it:
1525
1521
 
1526
- 1. Add the new `automatic_deployments` property to your `backend` configuration with a value of `false`:
1522
+ 1. Add the `skip_ci` property to your `backend` configuration with a value of `true`:
1527
1523
  ```yaml
1528
1524
  backend:
1529
1525
  name: github
1530
1526
  repo: owner/repo
1531
1527
  branch: main
1532
- automatic_deployments: false
1528
+ skip_ci: true
1533
1529
  ```
1534
1530
  1. Commit and deploy the change to the config file and reload the CMS.
1535
1531
  1. Now, whenever you save an entry or asset, `[skip ci]` is automatically added to each commit message. However, deletions are always committed without the prefix to avoid unexpected data retention on your site.
1536
1532
  1. If you want to deploy a new or updated entry, as well as any other unpublished entries and assets, click an arrow next to the Save button in the Content Editor, then select **Save and Publish**. This will trigger CI/CD by omitting `[skip ci]`.
1537
1533
 
1538
- If you set `automatic_deployments` to `true`, the behaviour is reversed. CI/CD will be triggered by default, while you have an option to **Save without Publishing** that adds `[skip ci]` only to the associated commit.
1534
+ If you set `skip_ci` to `false`, the behaviour is reversed. CI/CD will be triggered by default, while you have an option to **Save without Publishing** that adds `[skip ci]` only to the associated commit.
1539
1535
 
1540
1536
  Gotcha: Unpublished entries and assets are not drafts. Once committed to your repository, those changes can be deployed any time another commit is pushed without `[skip ci]`, or when a manual deployment is triggered.
1541
1537
 
1542
- If the `automatic_deployments` property is defined, you can manually trigger a deployment by clicking the **Publish Changes** button on the application header. To use this feature:
1538
+ If the `skip_ci` property is defined, you can manually trigger a deployment by clicking the **Publish Changes** button on the application header. To use this feature:
1543
1539
 
1544
1540
  - GitHub Actions:
1545
1541
  1. Without any configuration, Publish Changes will [trigger a `repository_dispatch` event](https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event) with the `sveltia-cms-publish` event type. Update your build workflow to receive this event:
@@ -1698,7 +1694,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1698
1694
 
1699
1695
  ## Roadmap
1700
1696
 
1701
- The list below gives you an idea of what we are working on and what we plan to implement in the future. It is not a complete list of all issues, but rather a summary of the most important features and improvements. Things may change as we progress, so please check back regularly.
1697
+ We have a lot of ideas and plans for Sveltia CMS. Here are some highlights. This includes 150+ more issues of Netlify/Decap CMS that we plan to solve, in addition to the 250+ issues we’ve already solved. In total, we aim to solve 400+ issues, as mentioned in the [Project status](#project-status) section.
1702
1698
 
1703
1699
  ### v1.0
1704
1700
 
@@ -1753,7 +1749,6 @@ Due early 2026
1753
1749
  - [Asset collections](https://github.com/sveltia/sveltia-cms/issues/301)[^271]
1754
1750
  - [Automatic asset file renaming with templates](https://github.com/sveltia/sveltia-cms/issues/422)[^241]
1755
1751
  - and many more (100+ issues and discussions)
1756
- - As we mentioned in the [Project status](#project-status) section, we’re planning to solve 400+ issues in total.
1757
1752
  - Enhancements to Sveltia CMS Additions (some may be included in v3.0):
1758
1753
  - Post locking[^166] (like [WordPress](https://codex.wordpress.org/Post_Locking))
1759
1754
  - Scheduled posts[^167]
@@ -1778,7 +1773,7 @@ Due early 2026
1778
1773
  ### Non-goals
1779
1774
 
1780
1775
  - Support for non-Git backends. Sveltia CMS is a Git-based headless CMS and will remain so to avoid feature creep and increased maintenance costs.
1781
- - Framework-specific integrations, including a WYSIWYG editor. Due to the crowded CMS market and our limited resources, we will focus on framework-agnostic core features that are essential for succeeding Netlify/Decap CMS and modernizing the platform.
1776
+ - Framework-specific integrations, including a WYSIWYG editor. We will focus on framework-agnostic core features that are essential for succeeding Netlify/Decap CMS and modernizing the platform.
1782
1777
  - Monetization. We may offer an affordable cloud version in the future since self-hosting the CMS can be a hassle. However, we will not charge for the CMS itself. We want to keep it free and open source forever.
1783
1778
 
1784
1779
  ## Trivia
@@ -2023,7 +2018,7 @@ This software is provided “as is” without any express or implied warranty. W
2023
2018
 
2024
2019
  [^112]: Netlify/Decap CMS [#5815](https://github.com/decaporg/decap-cms/issues/5815), [#6522](https://github.com/decaporg/decap-cms/issues/6522), [#6532](https://github.com/decaporg/decap-cms/issues/6532), [#6588](https://github.com/decaporg/decap-cms/issues/6588), [#6617](https://github.com/decaporg/decap-cms/issues/6617), [#6640](https://github.com/decaporg/decap-cms/issues/6640), [#6663](https://github.com/decaporg/decap-cms/issues/6663), [#6695](https://github.com/decaporg/decap-cms/issues/6695), [#6697](https://github.com/decaporg/decap-cms/issues/6697), [#6764](https://github.com/decaporg/decap-cms/issues/6764), [#6765](https://github.com/decaporg/decap-cms/issues/6765), [#6835](https://github.com/decaporg/decap-cms/issues/6835), [#6983](https://github.com/decaporg/decap-cms/issues/6983), [#7205](https://github.com/decaporg/decap-cms/issues/7205), [#7450](https://github.com/decaporg/decap-cms/issues/7450), [#7453](https://github.com/decaporg/decap-cms/issues/7453), [#7572](https://github.com/decaporg/decap-cms/issues/7572)
2025
2020
 
2026
- [^113]: Netlify/Decap CMS [#5656](https://github.com/decaporg/decap-cms/issues/5656), [#5837](https://github.com/decaporg/decap-cms/issues/5837), [#5972](https://github.com/decaporg/decap-cms/issues/5972), [#6476](https://github.com/decaporg/decap-cms/issues/6476), [#6516](https://github.com/decaporg/decap-cms/issues/6516), [#6930](https://github.com/decaporg/decap-cms/issues/6930), [#7080](https://github.com/decaporg/decap-cms/issues/7080), [#7105](https://github.com/decaporg/decap-cms/issues/7105), [#7106](https://github.com/decaporg/decap-cms/issues/7106), [#7119](https://github.com/decaporg/decap-cms/issues/7119), [#7176](https://github.com/decaporg/decap-cms/issues/7176), [#7194](https://github.com/decaporg/decap-cms/issues/7194), [#7244](https://github.com/decaporg/decap-cms/issues/7244), [#7278](https://github.com/decaporg/decap-cms/issues/7278), [#7301](https://github.com/decaporg/decap-cms/issues/7301), [#7342](https://github.com/decaporg/decap-cms/issues/7342), [#7348](https://github.com/decaporg/decap-cms/issues/7348), [#7354](https://github.com/decaporg/decap-cms/issues/7354), [#7376](https://github.com/decaporg/decap-cms/issues/7376), [#7408](https://github.com/decaporg/decap-cms/issues/7408), [#7412](https://github.com/decaporg/decap-cms/issues/7412), [#7413](https://github.com/decaporg/decap-cms/issues/7413), [#7422](https://github.com/decaporg/decap-cms/issues/7422), [#7427](https://github.com/decaporg/decap-cms/issues/7427), [#7434](https://github.com/decaporg/decap-cms/issues/7434), [#7438](https://github.com/decaporg/decap-cms/issues/7438), [#7454](https://github.com/decaporg/decap-cms/issues/7454), [#7464](https://github.com/decaporg/decap-cms/issues/7464), [#7471](https://github.com/decaporg/decap-cms/issues/7471), [#7485](https://github.com/decaporg/decap-cms/issues/7485), [#7499](https://github.com/decaporg/decap-cms/issues/7499), [#7515](https://github.com/decaporg/decap-cms/issues/7515), [#7564](https://github.com/decaporg/decap-cms/issues/7564), [#7571](https://github.com/decaporg/decap-cms/issues/7571), [#7574](https://github.com/decaporg/decap-cms/issues/7574), [#7580](https://github.com/decaporg/decap-cms/issues/7580) — These `removeChild` crashes are common in React apps, likely caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).
2021
+ [^113]: Netlify/Decap CMS [#5656](https://github.com/decaporg/decap-cms/issues/5656), [#5837](https://github.com/decaporg/decap-cms/issues/5837), [#5972](https://github.com/decaporg/decap-cms/issues/5972), [#6476](https://github.com/decaporg/decap-cms/issues/6476), [#6516](https://github.com/decaporg/decap-cms/issues/6516), [#6930](https://github.com/decaporg/decap-cms/issues/6930), [#7080](https://github.com/decaporg/decap-cms/issues/7080), [#7105](https://github.com/decaporg/decap-cms/issues/7105), [#7106](https://github.com/decaporg/decap-cms/issues/7106), [#7119](https://github.com/decaporg/decap-cms/issues/7119), [#7176](https://github.com/decaporg/decap-cms/issues/7176), [#7194](https://github.com/decaporg/decap-cms/issues/7194), [#7244](https://github.com/decaporg/decap-cms/issues/7244), [#7278](https://github.com/decaporg/decap-cms/issues/7278), [#7301](https://github.com/decaporg/decap-cms/issues/7301), [#7342](https://github.com/decaporg/decap-cms/issues/7342), [#7348](https://github.com/decaporg/decap-cms/issues/7348), [#7354](https://github.com/decaporg/decap-cms/issues/7354), [#7376](https://github.com/decaporg/decap-cms/issues/7376), [#7408](https://github.com/decaporg/decap-cms/issues/7408), [#7412](https://github.com/decaporg/decap-cms/issues/7412), [#7413](https://github.com/decaporg/decap-cms/issues/7413), [#7422](https://github.com/decaporg/decap-cms/issues/7422), [#7427](https://github.com/decaporg/decap-cms/issues/7427), [#7434](https://github.com/decaporg/decap-cms/issues/7434), [#7438](https://github.com/decaporg/decap-cms/issues/7438), [#7454](https://github.com/decaporg/decap-cms/issues/7454), [#7464](https://github.com/decaporg/decap-cms/issues/7464), [#7471](https://github.com/decaporg/decap-cms/issues/7471), [#7485](https://github.com/decaporg/decap-cms/issues/7485), [#7499](https://github.com/decaporg/decap-cms/issues/7499), [#7515](https://github.com/decaporg/decap-cms/issues/7515), [#7564](https://github.com/decaporg/decap-cms/issues/7564), [#7571](https://github.com/decaporg/decap-cms/issues/7571), [#7574](https://github.com/decaporg/decap-cms/issues/7574), [#7580](https://github.com/decaporg/decap-cms/issues/7580), [#7583](https://github.com/decaporg/decap-cms/issues/7583) — These `removeChild` crashes are common in React apps, likely caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).
2027
2022
 
2028
2023
  [^114]: Netlify/Decap CMS [#5029](https://github.com/decaporg/decap-cms/issues/5029), [#5048](https://github.com/decaporg/decap-cms/issues/5048)
2029
2024