@sveltia/cms 0.102.0 → 0.103.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
@@ -12,7 +12,7 @@ Welcome to the only Netlify CMS successor you can trust!
12
12
 
13
13
  ![Stock photo integration: Pexels, Pixabay, Unsplash](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-3.webp?20250405)<br>
14
14
 
15
- ![Full-fledged Asset Library; first-class internationalization support; Google Cloud Translation and OpenAI integration](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-4.webp?20250812)<br>
15
+ ![Full-fledged Asset Library; first-class internationalization support; Google Cloud Translation, Anthropic and OpenAI integration](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-4.webp?20250831)<br>
16
16
 
17
17
  ![Built-in image optimizer for WebP and SVG; mobile & tablet support](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-5.webp?20250409)<br>
18
18
 
@@ -23,7 +23,7 @@ Welcome to the only Netlify CMS successor you can trust!
23
23
  - [Motivation](#motivation)
24
24
  - [Our advantage](#our-advantage)
25
25
  - [Our goals](#our-goals)
26
- - [Project status](#project-status)
26
+ - [Project Status](#project-status)
27
27
  - [Differentiators](#differentiators)
28
28
  - [Better UX](#better-ux)
29
29
  - [Better performance](#better-performance)
@@ -45,21 +45,21 @@ Welcome to the only Netlify CMS successor you can trust!
45
45
  - [Better localization](#better-localization)
46
46
  - [Compatibility](#compatibility)
47
47
  - [Features not to be implemented](#features-not-to-be-implemented)
48
+ - [Other breaking changes](#other-breaking-changes)
48
49
  - [Current limitations](#current-limitations)
49
50
  - [Compatibility with Static CMS](#compatibility-with-static-cms)
50
51
  - [Framework support](#framework-support)
51
52
  - [Backend support](#backend-support)
52
53
  - [Browser support](#browser-support)
53
54
  - [Deprecations](#deprecations)
54
- - [Other notes](#other-notes)
55
- - [Getting started](#getting-started)
55
+ - [Getting Started](#getting-started)
56
56
  - [Installation \& setup](#installation--setup)
57
57
  - [Migration](#migration)
58
58
  - [Editing the configuration file](#editing-the-configuration-file)
59
59
  - [Migrating from Git Gateway backend](#migrating-from-git-gateway-backend)
60
60
  - [Installing with npm](#installing-with-npm)
61
61
  - [Updates](#updates)
62
- - [Tips \& tricks](#tips--tricks)
62
+ - [Tips \& Tricks](#tips--tricks)
63
63
  - [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
64
64
  - [Enabling autocomplete and validation for the configuration file](#enabling-autocomplete-and-validation-for-the-configuration-file)
65
65
  - [Providing a JSON configuration file](#providing-a-json-configuration-file)
@@ -91,7 +91,7 @@ Welcome to the only Netlify CMS successor you can trust!
91
91
  - [Disabling automatic deployments](#disabling-automatic-deployments)
92
92
  - [Setting up Content Security Policy](#setting-up-content-security-policy)
93
93
  - [Showing the CMS version](#showing-the-cms-version)
94
- - [Support \& feedback](#support--feedback)
94
+ - [Support \& Feedback](#support--feedback)
95
95
  - [Contributions](#contributions)
96
96
  - [Roadmap](#roadmap)
97
97
  - [v1.0](#v10)
@@ -100,7 +100,7 @@ Welcome to the only Netlify CMS successor you can trust!
100
100
  - [TBD](#tbd)
101
101
  - [Non-goals](#non-goals)
102
102
  - [Trivia](#trivia)
103
- - [Related links](#related-links)
103
+ - [Related Links](#related-links)
104
104
  - [As seen on](#as-seen-on)
105
105
  - [Disclaimer](#disclaimer)
106
106
 
@@ -132,7 +132,7 @@ While Sveltia CMS was created to replace legacy Netlify CMS instances, it can al
132
132
  - Extending its capabilities as digital asset management (DAM) software
133
133
  - Showcasing the power of Svelte and UX engineering
134
134
 
135
- ## Project status
135
+ ## Project Status
136
136
 
137
137
  Sveltia CMS is currently in **beta** and version 1.0 (GA) is expected to ship in late 2025. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) and follow us on [Bluesky](https://bsky.app/profile/sveltiacms.app) for updates. See also our [roadmap](#roadmap).
138
138
 
@@ -141,7 +141,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
141
141
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#current-limitations)
142
142
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
143
143
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
144
- - So far, **250+ issues, or 535+ if including duplicates, have been effectively solved** in Sveltia CMS (Yes, you read it right)
144
+ - So far, **250+ issues, or 540+ if including duplicates, have been effectively solved** in Sveltia CMS (Yes, you read it right)
145
145
  - Target:
146
146
  - 250 issues, or 500 if including duplicates, by GA — We did it! 🎉
147
147
  - 400 issues, or 800 if including duplicates, in the future 💪
@@ -248,7 +248,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
248
248
  - Also supports [multiple configuration files](#providing-multiple-configuration-files) to allow developers to modularize the configuration.[^197]
249
249
  - We provide an [up-to-date JSON schema](#enabling-autocomplete-and-validation-for-the-configuration-file) for YAML/JSON configuration files, which enables autocomplete and validation in VS Code and other editors.[^253]
250
250
  - Improved TypeScript support: We keep our type definitions for `CMS.init()` and other methods complete, accurate, up-to-date and annotated.[^190][^191][^192][^193][^227] This makes it easier to provide a site config object when [manually initializing](https://decapcms.org/docs/manual-initialization/) the CMS.
251
- - Deprecated options are clearly marked as such in both the JSON schema and the TypeScript type definitions. If you use them in a supported code editor, you should receive a warning.
251
+ - [Deprecated options](#deprecations) are clearly marked as such in both the JSON schema and the TypeScript type definitions. If you use these options in a supported code editor, you should receive a warning.
252
252
 
253
253
  ### Better backend support
254
254
 
@@ -344,15 +344,18 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
344
344
  - The collection `folder` can be an empty string (or `.` or `/`) if you want to store entries in the root folder. This supports a typical VitePress setup.
345
345
  - Entry slugs
346
346
  - It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
347
+ - Entry slug are editable.[^184]
348
+ - To allow users to explicitly edit the entry slug in an initial entry draft, add `{{fields._slug}}` to the `slug` collection option. This will display a special slug editor UI that looks like a standard string field, but the value will be used as the entry slug.
349
+ - Once an entry is saved, users can edit the slug via the 3-dot menu in the Content Editor.
350
+ - Entry slugs are [localizable](#localizing-entry-slugs).[^80]
351
+ - Use `{{fields._slug | localize}}` to make the slug field editable and localizable.
347
352
  - 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]
348
- - Users can edit entry slugs via the 3-dot menu in the Content Editor.[^184]
349
353
  - 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.
350
354
  - Entry slug template tags support [transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags.[^29]
351
355
  - Single quotes (apostrophes) in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed.[^52]
352
356
  - The [global `slug` option](https://decapcms.org/docs/configuration-options/#slug-type) accepts the `trim` option to remove leading and trailing replacement characters, such as hyphens, from an entry slug. The default value is `true`. Set to `false` to keep them.
353
357
  - 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]
354
358
  - Setting the collection `path` doesn’t affect the entry slugs stored with the Relation widget.[^137]
355
- - Entry slugs are [localizable](#localizing-entry-slugs).[^80]
356
359
  - Entry listing
357
360
  - The [default sort field and direction](#specifying-default-entry-sort-field-and-direction) can be specified.[^172]
358
361
  - The default filter and group can also be specified in the same way as with [Static CMS](https://staticjscms.netlify.app/docs/collection-overview#view-filters).[^269]
@@ -624,7 +627,16 @@ However, 100% feature parity is never planned, and some features are still missi
624
627
  - Relation widget: `options_length`
625
628
  - The global [`locale`](https://decapcms.org/docs/configuration-options/#locale) option and `CMS.registerLocale()` method: Sveltia CMS automatically detects the user’s preferred language and changes the UI locale as [mentioned above](#better-localization).
626
629
  - [Undocumented methods](https://github.com/sveltia/sveltia-cms/blob/c69446da7bb0bab7405be741c0f92850c5dddfa8/src/main.js#L14-L37) exposed on the `CMS` object: 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.
627
- - Any other undocumented options/features. Exceptions apply.
630
+ - Any other undocumented features and options. Exceptions apply.
631
+
632
+ ### Other breaking changes
633
+
634
+ There are some differences in behaviour between Sveltia CMS and Netlify/Decap CMS that may affect your existing configuration or content.
635
+
636
+ - In some cases, the [data output](#better-data-output) of Sveltia CMS may differ from that of Netlify/Decap CMS. Notably, Sveltia CMS does not omit empty optional fields by default. If you have data validation in your site generator, this could cause issues.
637
+ - 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 your own remote server and serving content over HTTP, the CMS will not work. We recommend obtaining a TLS certificate from [Let’s Encrypt](https://letsencrypt.org/).
638
+
639
+ [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=bug) if you have encounter any compatibility issues that are not listed here.
628
640
 
629
641
  ### Current limitations
630
642
 
@@ -646,8 +658,6 @@ Due to the complexity, we have decided to defer the following features to the 2.
646
658
  - [Nested collections](https://decapcms.org/docs/collection-nested/) (beta)
647
659
  - The `media_folder` and `public_folder` options (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets ([#497](https://github.com/sveltia/sveltia-cms/issues/497))
648
660
 
649
- Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=bug). Bear in mind that undocumented behaviour can easily be overlooked.
650
-
651
661
  ### Compatibility with Static CMS
652
662
 
653
663
  Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. Since Static CMS was archived some time ago, we don’t plan to implement additional compatibility beyond what’s listed below. However, we may still adopt some of their features that we find useful.
@@ -701,11 +711,7 @@ These options are deprecated and will be removed in Sveltia CMS v1.0:
701
711
  - The `yaml_quote` collection option. `yaml_quote: true` is equivalent to `quote: double` in the [new YAML format options](#controlling-data-output).
702
712
  - The `read_only` UUID widget option. Use the `readonly` common field option instead, which defaults to `true` for the UUID widget.
703
713
 
704
- ### Other notes
705
-
706
- - 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/).
707
-
708
- ## Getting started
714
+ ## Getting Started
709
715
 
710
716
  ### Installation & setup
711
717
 
@@ -782,7 +788,7 @@ Updating Sveltia CMS is transparent, unless you include a specific version in th
782
788
 
783
789
  If you’ve chosen to install with npm, updating the package is your responsibility. We strongly recommend using [`ncu`](https://www.npmjs.com/package/npm-check-updates) or a service like [Dependabot](https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/) to keep dependencies up to date. Otherwise, you’ll miss important bug fixes and new features. (ProTip: We update our dependencies using `ncu -u && pnpm up` at least once a week.)
784
790
 
785
- ## Tips & tricks
791
+ ## Tips & Tricks
786
792
 
787
793
  ### Moving your site from Netlify to another hosting service
788
794
 
@@ -1109,7 +1115,7 @@ The configuration for a [file collection](https://decapcms.org/docs/collection-f
1109
1115
 
1110
1116
  ### Translating entry fields with one click
1111
1117
 
1112
- Sveltia CMS comes with a handy translation API integration so that you can translate any text field from another locale without leaving the Content Editor. Currently, Google’s Cloud Translation and OpenAI’s GPT-3.5 Turbo are supported. To enable the quick translation feature:
1118
+ Sveltia CMS comes with a handy translation API integration so that you can translate any text field from another locale without leaving the Content Editor. Currently, Google’s Cloud Translation, Anthropic’s Claude Haiku 3.5 and OpenAI’s GPT-3.5 Turbo are supported. To enable the quick translation feature:
1113
1119
 
1114
1120
  1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
1115
1121
  1. Create a new API key for the translation service of your choice:
@@ -1117,6 +1123,10 @@ Sveltia CMS comes with a handy translation API integration so that you can trans
1117
1123
  1. Sign in or sign up for [Google Cloud](https://cloud.google.com/) and create a new project.
1118
1124
  1. Enable the [Cloud Translation API](https://console.cloud.google.com/apis/library/translate.googleapis.com). It’s free up to 500,000 characters per month.
1119
1125
  1. Create a [new API key](https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials) and copy it.
1126
+ - Anthropic
1127
+ 1. Sign in or sign up for [Anthropic Developer Platform](https://docs.anthropic.com/en/api/overview).
1128
+ 1. Add a credit balance (minimum $5) to your account.
1129
+ 1. Create a [new API key](https://console.anthropic.com/settings/keys) and copy it.
1120
1130
  - OpenAI
1121
1131
  1. Sign in or sign up for [OpenAI Platform](https://platform.openai.com/docs/overview) and create a new project.
1122
1132
  1. Add a credit balance (minimum $5) to your account.
@@ -1639,6 +1649,11 @@ Then, add the following origins depending on your Git backend and enabled integr
1639
1649
  ```
1640
1650
  https://translation.googleapis.com
1641
1651
  ```
1652
+ - Anthropic:
1653
+ - `connect-src`
1654
+ ```
1655
+ https://api.anthropic.com
1656
+ ```
1642
1657
  - OpenAI:
1643
1658
  - `connect-src`
1644
1659
  ```
@@ -1679,7 +1694,7 @@ img-src 'self' blob: data: https://*;
1679
1694
 
1680
1695
  A Release Notes link will now appear under the Account menu with the current application version.
1681
1696
 
1682
- ## Support & feedback
1697
+ ## Support & Feedback
1683
1698
 
1684
1699
  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.
1685
1700
 
@@ -1695,7 +1710,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1695
1710
 
1696
1711
  ## Roadmap
1697
1712
 
1698
- 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.
1713
+ 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.
1699
1714
 
1700
1715
  ### v1.0
1701
1716
 
@@ -1773,8 +1788,10 @@ Due early 2026
1773
1788
 
1774
1789
  ### Non-goals
1775
1790
 
1791
+ - Serving 100% of the existing Netlify/Decap CMS user base. While we aim to support most use cases, some users may be unable to migrate to Sveltia CMS due to unsupported features or technical limitations. See the [Compatibility](#compatibility) section for details.
1776
1792
  - 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.
1777
1793
  - 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.
1794
+ - Enterprise features. We want to keep Sveltia CMS simple and easy to use for small teams and individual developers.
1778
1795
  - 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.
1779
1796
 
1780
1797
  ## Trivia
@@ -1782,7 +1799,7 @@ Due early 2026
1782
1799
  - The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. There was also an [attempt](https://github.com/decaporg/decap-cms/issues/328) to replace React with Preact. And now we are completely rewriting it in Svelte. So this is effectively the third time the application has gone through a framework migration.
1783
1800
  - Our [local repository workflow](#working-with-a-local-git-repository) shares implementation with the Test backend, as both utilize the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API), allowing us to reduce maintenance costs. The seamless local workflow is critical not only for improved DX, but also for our rapid application development.
1784
1801
 
1785
- ## Related links
1802
+ ## Related Links
1786
1803
 
1787
1804
  - Introducing Sveltia CMS: a short technical presentation by [@kyoshino](https://github.com/kyoshino) during the _This Week in Svelte_ online meetup on March 31, 2023 — [recording](https://youtu.be/-YjLubiieYs?t=1660) & [slides](https://docs.google.com/presentation/d/1Wi4ty-1AwOp2-zy7LctmzCV4rrdYPfke9NGhO0DdRdM)
1788
1805
 
@@ -2349,7 +2366,7 @@ This software is provided “as is” without any express or implied warranty. W
2349
2366
 
2350
2367
  [^277]: Netlify/Decap CMS [#86](https://github.com/decaporg/decap-cms/issues/86)
2351
2368
 
2352
- [^278]: Netlify/Decap CMS [#7575](https://github.com/decaporg/decap-cms/issues/7575), [#7576](https://github.com/decaporg/decap-cms/issues/7576)
2369
+ [^278]: Netlify/Decap CMS [#7575](https://github.com/decaporg/decap-cms/issues/7575), [#7576](https://github.com/decaporg/decap-cms/issues/7576), [#7587](https://github.com/decaporg/decap-cms/issues/7587)
2353
2370
 
2354
2371
  [^279]: Netlify/Decap CMS [#1390](https://github.com/decaporg/decap-cms/issues/1390), [#4912](https://github.com/decaporg/decap-cms/issues/4912), [#6986](https://github.com/decaporg/decap-cms/issues/6986)
2355
2372