@sveltia/cms 0.105.4 → 0.105.6
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 +30 -16
- package/dist/sveltia-cms.js +200 -200
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +203 -203
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, powerful, quick replacement for Netlify CMS and Decap CMS. While some features are still missing, we’ve already solved over 250 issues reported in the predecessor’s repository, from critical bugs to top feature requests.
|
|
4
4
|
|
|
5
|
-
Built from
|
|
5
|
+
Built from the ground up, Sveltia CMS offers an excellent UX, DX, performance, security and internationalization (i18n) support. Our numerous enhancements across the board ensure smooth daily workflows. This free, open source alternative to Netlify/Decap CMS is now in public beta, with version 1.0 expected in late 2025.
|
|
6
6
|
|
|
7
7
|
<br>
|
|
8
8
|
|
|
@@ -168,7 +168,8 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
168
168
|
|
|
169
169
|
- Created and actively maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design, marketing, localization and everything in between. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
|
|
170
170
|
- 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.
|
|
171
|
-
- Frequent releases deliver new features and enhancements to users
|
|
171
|
+
- Frequent releases deliver new features and enhancements to users more quickly. The release interval of Decap CMS has been irregular and often long, sometimes exceeding several months.
|
|
172
|
+
- Many 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.
|
|
172
173
|
- 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]
|
|
173
174
|
- Provides immersive dark mode.[^2] The UI theme follows the user’s system preference by default and can be changed in the application settings.
|
|
174
175
|
- Users can easily manage content on-the-go with mobile and tablet support.[^18][^215]
|
|
@@ -198,7 +199,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
198
199
|
### Better productivity
|
|
199
200
|
|
|
200
201
|
- Developers can [work with a local Git repository](#working-with-a-local-git-repository) without any additional configuration or proxy server, resulting in a streamlined workflow and improved performance.[^26]
|
|
201
|
-
- It also avoids a number of issues, including potential security
|
|
202
|
+
- It also avoids a number of issues, including potential security risks,[^158][^282] a 30 MB file size limit,[^51] an unknown error with `publish_mode`,[^75] and an unused `logo_url`.[^49]
|
|
202
203
|
- When you delete an entry or an asset file, the empty folder that contains it is also deleted, so you don’t have to delete it manually.
|
|
203
204
|
- Provides a smoother user experience in the Content Editor:
|
|
204
205
|
- A local backup of an entry draft is automatically created without interruption by a confirmation dialog, which annoys users and can cause a page navigation problem if dismissed.[^106] The backup can then be reliably restored without unexpected overwriting.[^85]
|
|
@@ -227,7 +228,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
227
228
|
- Avoids vulnerabilities in dependencies through constant updates, Dependabot alerts, [`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]
|
|
228
229
|
- The [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28) found in Decap CMS does not affect Sveltia CMS, as our entry preview implementation is completely different.
|
|
229
230
|
- However, the Markdown widget was potentially vulnerable to XSS attacks because the `sanitize_preview` option was set to `false` by default for compatibility with Netlify/Decap CMS. This behaviour is [documented](https://decapcms.org/docs/widgets/#markdown) and is not a bug, but it’s definitely not secure. In [Sveltia CMS 0.105.0](https://github.com/sveltia/sveltia-cms/releases/tag/v0.105.0), we changed the default value to `true`, assuming that most users would prefer security over compatibility.
|
|
230
|
-
- Thanks to pnpm,
|
|
231
|
+
- Thanks to pnpm, Vite, GitHub Actions and [npm package provenance](https://github.blog/security/supply-chain-security/introducing-npm-package-provenance/), our release process is fast, reliable and transparent. This setup makes it easy to verify the integrity of published code and assets. It also helps us avoid errors that can occur with manual build steps.[^264]
|
|
231
232
|
- We have created a [security policy](https://github.com/sveltia/sveltia-cms/blob/main/SECURITY.md).
|
|
232
233
|
- 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]
|
|
233
234
|
- The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive.[^34]
|
|
@@ -238,7 +239,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
238
239
|
|
|
239
240
|
### Better installation
|
|
240
241
|
|
|
241
|
-
- 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]
|
|
242
|
+
- 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] No dependencies will be installed when you [install the app with npm](#installing-with-npm).
|
|
242
243
|
- Sveltia CMS also won’t cause peer dependency conflicts mainly due to legacy third-party React UI libraries.[^175][^237] We build the app using [our own Svelte UI component library](https://github.com/sveltia/sveltia-ui) to reduce reliance on third parties.
|
|
243
244
|
- 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 the proper URL (`/admin/config.yml`) instead of a regular relative URL (`./config.yml` = `/config.yml`), which results in a 404 Not Found error.[^107]
|
|
244
245
|
- 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.
|
|
@@ -269,7 +270,7 @@ The [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapc
|
|
|
269
270
|
- 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]
|
|
270
271
|
- 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]
|
|
271
272
|
- 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.
|
|
272
|
-
- Features the all-new [local repository workflow](#working-with-a-local-git-repository)
|
|
273
|
+
- Features the all-new [local repository workflow](#working-with-a-local-git-repository) for a better DX. See the [productivity section](#better-productivity) above.
|
|
273
274
|
- Developers can select the local and remote backends while working on a local server.
|
|
274
275
|
- 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).
|
|
275
276
|
|
|
@@ -284,12 +285,13 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
284
285
|
- Gives more control over [entry file paths](#controlling-entry-file-paths):
|
|
285
286
|
- The new `multiple_folders_i18n_root` i18n structure allows to have locale folders below the project root: `/<locale>/<folder>/<path>.<extension>`.[^182]
|
|
286
287
|
- The new `omit_default_locale_from_filename` i18n option allows to exclude the default locale from filenames. This option applies to entry collections with the `multiple_files` i18n structure enabled, as well as to file collection items with the `file` path ending with `.{{locale}}.<extension>`, aiming to support [Zola’s multilingual sites](https://www.getzola.org/documentation/content/multilingual/). ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/394))
|
|
288
|
+
- [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure.[^21]
|
|
289
|
+
- Entry slug enhancements:
|
|
290
|
+
- It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters.
|
|
291
|
+
- It’s possible to [localize entry slugs](#localizing-entry-slugs) while linking the localized files,[^80] thanks to the support for Hugo’s `translationKey`.[^81]
|
|
292
|
+
- 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]
|
|
287
293
|
- The `required` field option accepts an array of locale codes in addition to a boolean, making the field required for a subset of locales when i18n support is enabled. For example, if only English is required, you could write `required: [en]`. An empty array is equivalent to `required: false`.
|
|
288
|
-
- [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure.[^21]
|
|
289
294
|
- The `{{locale}}` template tag can be used in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language.[^63]
|
|
290
|
-
- It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters.
|
|
291
|
-
- It’s possible to [localize entry slugs](#localizing-entry-slugs) while linking the localized files,[^80] thanks to the support for Hugo’s `translationKey`.[^81]
|
|
292
|
-
- 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]
|
|
293
295
|
- It’s possible to embed the locale code in an entry by using `widget: hidden` along with `default: '{{locale}}'`.[^101]
|
|
294
296
|
- The `value_field` Relation field option can contain a locale prefix like `{{locale}}/{{slug}}`, which will be replaced with the current locale. It’s intended to support i18n in Astro. ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/302))
|
|
295
297
|
- User interface
|
|
@@ -1151,9 +1153,9 @@ To enable the quick translation feature:
|
|
|
1151
1153
|
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.
|
|
1152
1154
|
1. Create a [new API key](https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials) and copy it.
|
|
1153
1155
|
- Anthropic
|
|
1154
|
-
1. Sign in or sign up for [
|
|
1156
|
+
1. Sign in or sign up for [Claude Developer Platform](https://docs.claude.com/en/api/overview).
|
|
1155
1157
|
1. Add a credit balance (minimum $5) to your account.
|
|
1156
|
-
1. Create a [new API key](https://
|
|
1158
|
+
1. Create a [new API key](https://platform.claude.com/settings/keys) and copy it.
|
|
1157
1159
|
- OpenAI
|
|
1158
1160
|
1. Sign in or sign up for [OpenAI Platform](https://platform.openai.com/docs/overview) and create a new project.
|
|
1159
1161
|
1. Add a credit balance (minimum $5) to your account.
|
|
@@ -1284,8 +1286,7 @@ media_libraries:
|
|
|
1284
1286
|
config:
|
|
1285
1287
|
max_file_size: 1024000 # default: Infinity
|
|
1286
1288
|
slugify_filename: true # default: false
|
|
1287
|
-
transformations:
|
|
1288
|
-
# See the next section
|
|
1289
|
+
transformations: # See the next section
|
|
1289
1290
|
cloudinary:
|
|
1290
1291
|
config:
|
|
1291
1292
|
cloud_name: YOUR_CLOUD_NAME
|
|
@@ -1301,6 +1302,19 @@ media_libraries:
|
|
|
1301
1302
|
|
|
1302
1303
|
Note: Cloudinary and Uploadcare are not yet supported in Sveltia CMS.
|
|
1303
1304
|
|
|
1305
|
+
Similar to the conventional `media_library` option, the unified `media_libraries` option can also be defined for each File/Image field. This allows you to use different media library configurations for different fields. For example, you can optimize images for upload in one field while using the default settings in another:
|
|
1306
|
+
|
|
1307
|
+
```yaml
|
|
1308
|
+
fields:
|
|
1309
|
+
- name: cover
|
|
1310
|
+
label: Cover Image
|
|
1311
|
+
widget: image
|
|
1312
|
+
media_libraries:
|
|
1313
|
+
default:
|
|
1314
|
+
config:
|
|
1315
|
+
transformations: # See the next section
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1304
1318
|
### Optimizing images for upload
|
|
1305
1319
|
|
|
1306
1320
|
Ever wanted to prevent end-users from adding huge images to your repository? The built-in image optimizer in Sveltia CMS makes developers’ lives easier with a simple configuration like this:
|
|
@@ -1833,7 +1847,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
|
|
|
1833
1847
|
|
|
1834
1848
|
As mentioned in the [Project Status](#project-status) section, we aim to solve 400+ [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) in total over the course of this project. We also have lots of ideas to make Sveltia CMS a great product.
|
|
1835
1849
|
|
|
1836
|
-
We cannot promise any specific
|
|
1850
|
+
We cannot promise any specific release dates, but here is a rough roadmap for the next few years.
|
|
1837
1851
|
|
|
1838
1852
|
### v1.0
|
|
1839
1853
|
|
|
@@ -1926,7 +1940,7 @@ Due early/mid 2026
|
|
|
1926
1940
|
## Trivia
|
|
1927
1941
|
|
|
1928
1942
|
- 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. Now we have completely rebuilt it in Svelte 4 and then in Svelte 5. So this is effectively the third/fourth time the application has gone through a framework migration. One more thing: We may migrate to [Ripple](https://www.ripplejs.com/) in the future if it looks promising.
|
|
1929
|
-
- 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.
|
|
1943
|
+
- 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 an improved DX, but also for our rapid application development.
|
|
1930
1944
|
- The maintainer may look 25 years younger than his actual age. [Here’s why](https://github.com/kyoshino#fun-facts-about-me).
|
|
1931
1945
|
|
|
1932
1946
|
## Related Links
|