@sveltia/cms 0.57.0 → 0.58.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 +27 -12
- package/dist/sveltia-cms.js +180 -179
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +154 -153
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ We loved the concept of Netlify CMS — turning a Git repository into a database
|
|
|
92
92
|
Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successors:
|
|
93
93
|
|
|
94
94
|
- [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**: a total reboot, started in November 2022, first appeared on GitHub in March 2023
|
|
95
|
+
- **Sveltia CMS**: not a fork but a total reboot, started in November 2022, first appeared on GitHub in March 2023
|
|
96
96
|
- [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
97
|
|
|
98
98
|
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.
|
|
@@ -147,9 +147,9 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
|
|
|
147
147
|
### Better performance
|
|
148
148
|
|
|
149
149
|
- Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with any framework or static site generator (SSG) that can load static data files during the build process.
|
|
150
|
-
- Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.
|
|
150
|
+
- Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.9 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though we haven’t implemented some features yet, we have added a lot of new features. That’s the power of Svelte + [Vite](https://vite.dev/).
|
|
151
151
|
- We have upgraded from Svelte 4 to [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) to further improve performance, including an even smaller bundle size. A full migration to the Runes reactivity API is underway.
|
|
152
|
-
-
|
|
152
|
+
- [No virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
153
153
|
- Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly[^32][^65] (the useless `search` configuration option is therefore ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets.[^14]
|
|
154
154
|
- Saving entries and assets to GitHub is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
|
|
155
155
|
- Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern [File System Access API](https://developer.chrome.com/articles/file-system-access/) to read and write files natively through the web browser, rather than using a slow, ad hoc REST API through a proxy server.
|
|
@@ -224,6 +224,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
224
224
|
- The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
|
|
225
225
|
- File collections support multiple files/folders i18n structures.[^87] To enable it, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/about.{{locale}}.json` or `content/pages/{{locale}}/about.json`. For backward compatibility, the global `structure` option only applies to folder collections, and the default i18n structure for file collections remains single file.
|
|
226
226
|
- The List and Object widgets support the `i18n: duplicate` field configuration so that changes made with these widgets are duplicated between locales.[^7][^68] The `i18n` configuration can normally be used for the subfields.
|
|
227
|
+
- The new `multiple_folders_i18n_root` i18n structure allows to have locale folders below the project root: `<locale>/<folder>/<slug>.<extension>`. [^182]
|
|
227
228
|
- 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`.
|
|
228
229
|
- [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]
|
|
229
230
|
- 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]
|
|
@@ -343,8 +344,8 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
343
344
|
- A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error.[^45]
|
|
344
345
|
- An optional Boolean field with no default value is also saved as `false` by default, rather than nothing.[^46]
|
|
345
346
|
- Code
|
|
346
|
-
- The language switcher always appears in the user interface, so it’s easy to spot and change the selected language.
|
|
347
347
|
- More than 300 languages are available, thanks to [Prism](https://prismjs.com/)’s extensive language support.
|
|
348
|
+
- The language switcher always appears in the user interface, so it’s easy to spot and change the selected language.
|
|
348
349
|
- Code fields under a List field work as expected, saving both code and language.[^181]
|
|
349
350
|
- Color
|
|
350
351
|
- The widget doesn’t cause scrolling issues.[^128]
|
|
@@ -497,7 +498,7 @@ These limitations are expected to be resolved before the 1.0 release scheduled f
|
|
|
497
498
|
| --- | --- |
|
|
498
499
|
| Backends | The [Test backend](https://decapcms.org/docs/test-backend/) needed for our demo site is not yet added. We’ll see if [Azure DevOps](https://decapcms.org/docs/azure-backend/) can also be supported. |
|
|
499
500
|
| Configuration | Comprehensive config validation is not yet implemented. |
|
|
500
|
-
| Localization | The application UI is only available in English and Japanese at this time.
|
|
501
|
+
| Localization | The application UI is only available in English and Japanese at this time. |
|
|
501
502
|
| Media Libraries | [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) are not yet supported. |
|
|
502
503
|
| Widgets | [Custom widgets](https://decapcms.org/docs/custom-widgets/) are not yet supported. See the table below for other limitations. |
|
|
503
504
|
| Customization | [Custom previews](https://decapcms.org/docs/customization/) and [event subscriptions](https://decapcms.org/docs/registering-events/) are not yet supported. |
|
|
@@ -519,7 +520,7 @@ Due to the complexity, the following features are planned for after the 1.0 rele
|
|
|
519
520
|
|
|
520
521
|
### Compatibility with Static CMS
|
|
521
522
|
|
|
522
|
-
|
|
523
|
+
Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. This README will be updated as our development progresses.
|
|
523
524
|
|
|
524
525
|
- Configuration options
|
|
525
526
|
- Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/decap-migration-guide) to view filters/groups, List widget, etc. while Sveltia CMS follows Netlify/Decap CMS, so you should review your configuration carefully.
|
|
@@ -836,12 +837,24 @@ You can disable output of content in selected non-default locales by adding the
|
|
|
836
837
|
|
|
837
838
|
With the following configuration, you can disable the French and/or German translation while writing in English.
|
|
838
839
|
|
|
839
|
-
```
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
840
|
+
```yaml
|
|
841
|
+
i18n:
|
|
842
|
+
structure: multiple_files
|
|
843
|
+
locales: [en, fr, de]
|
|
844
|
+
default_locale: en
|
|
845
|
+
save_all_locales: false # default: true
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
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). When this option is used, `save_all_locales` will be `false`.
|
|
849
|
+
|
|
850
|
+
The following example disables German by default, but users can manually enable German if needed. Note that the default locale, in this case English, is always enabled.
|
|
851
|
+
|
|
852
|
+
```yaml
|
|
853
|
+
i18n:
|
|
854
|
+
structure: multiple_files
|
|
855
|
+
locales: [en, fr, de]
|
|
856
|
+
default_locale: en
|
|
857
|
+
initial_locales: [en, fr]
|
|
845
858
|
```
|
|
846
859
|
|
|
847
860
|
### Using a random ID for an entry slug
|
|
@@ -1467,3 +1480,5 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1467
1480
|
[^180]: Netlify/Decap CMS [#7399](https://github.com/decaporg/decap-cms/issues/7399)
|
|
1468
1481
|
|
|
1469
1482
|
[^181]: Netlify/Decap CMS [#6254](https://github.com/decaporg/decap-cms/issues/6254)
|
|
1483
|
+
|
|
1484
|
+
[^182]: Netlify/Decap CMS [#4416](https://github.com/decaporg/decap-cms/issues/4416)
|