@sveltia/cms 0.64.0 → 0.65.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 +43 -10
- package/dist/sveltia-cms.js +134 -134
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +137 -137
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/public.d.ts +32 -3
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
|
|
|
65
65
|
- [Localizing entry slugs](#localizing-entry-slugs)
|
|
66
66
|
- [Disabling non-default locale content](#disabling-non-default-locale-content)
|
|
67
67
|
- [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
|
|
68
|
+
- [Configure multiple media libraries](#configure-multiple-media-libraries)
|
|
68
69
|
- [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
|
|
69
70
|
- [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
|
|
70
71
|
- [Controlling data output](#controlling-data-output)
|
|
@@ -117,10 +118,10 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
117
118
|
- Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
|
|
118
119
|
- Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
|
|
119
120
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
120
|
-
- So far,
|
|
121
|
+
- So far, 185+ issues, or 375+ if including duplicates, have been effectively solved in Sveltia CMS
|
|
121
122
|
- Target:
|
|
122
123
|
- 200 issues, or 400 if including duplicates, by GA (almost there)
|
|
123
|
-
-
|
|
124
|
+
- 350 issues, or 600 if including duplicates, in the future (yes, you read that right)
|
|
124
125
|
- 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)
|
|
125
126
|
- Most of the bugs, including annoying crashes, are already solved
|
|
126
127
|
- 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
|
|
@@ -129,7 +130,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
129
130
|
- Responding to requests from the maintainer’s clients
|
|
130
131
|
- Making the code clean and maintainable
|
|
131
132
|
|
|
132
|
-
<br>
|
|
133
134
|
|
|
134
135
|
## Differentiators
|
|
135
136
|
|
|
@@ -152,8 +153,8 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
|
|
|
152
153
|
### Better performance
|
|
153
154
|
|
|
154
155
|
- Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast with [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
155
|
-
- The CMS is compiled and distributed as vanilla JavaScript. You can use it with any framework or static site generator (SSG) that can load static
|
|
156
|
-
- Small footprint: The bundle size is
|
|
156
|
+
- The CMS is compiled and distributed as vanilla JavaScript. You can use it 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.
|
|
157
|
+
- 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.5 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though some Netlify/Decap CMS features are [omitted](#features-not-to-be-implemented) or [unimplemented](#current-limitations) in Sveltia CMS, we have added a lot of new features. That’s the power of Svelte + [Vite](https://vite.dev/).
|
|
157
158
|
- 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.
|
|
158
159
|
- 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]
|
|
159
160
|
- 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/).
|
|
@@ -224,7 +225,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
|
|
|
224
225
|
- Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
|
|
225
226
|
- Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
|
|
226
227
|
- Developers can select the local and remote backends while working on a local server.
|
|
227
|
-
- The Test backend stores
|
|
228
|
+
- The Test backend stores entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS). Developers are free to play with the CMS without discarding changes.[^194]
|
|
228
229
|
|
|
229
230
|
### Better i18n support
|
|
230
231
|
|
|
@@ -480,12 +481,15 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
480
481
|
- Users can add assets using the Quick Add button in the upper right corner of the application.
|
|
481
482
|
- Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens.[^97]
|
|
482
483
|
- No fatal application crash when uploading assets.[^112]
|
|
484
|
+
- Supports multiple media libraries with the [new `media_libraries` option](#configure-multiple-media-libraries).[^195]
|
|
485
|
+
- The `max_file_size` option for the File/Image widget can be defined within the global `media_library` option, using `default` as the library name. It applies to all File/Image entry fields, as well as direct uploads to the Asset Library. The option can also be part of the [new `media_libraries` option](#configure-multiple-media-libraries).
|
|
483
486
|
|
|
484
487
|
### Better customization
|
|
485
488
|
|
|
486
489
|
- The application renders within the dimensions of a [custom mount element](https://decapcms.org/docs/custom-mounting/), if exists.[^109]
|
|
487
490
|
- A custom logo defined with the `logo_url` property is displayed on the global application header and the browser tab (favicon).[^134] A smaller logo is also correctly positioned on the authentication page.[^135]
|
|
488
|
-
- `CMS.registerCustomFormat()` supports async parser/formatter functions.[^149]
|
|
491
|
+
- [`CMS.registerCustomFormat()`](https://decapcms.org/docs/custom-formatters/) supports async parser/formatter functions.[^149]
|
|
492
|
+
- The component definition for [`CMS.registerEditorComponent()`](https://decapcms.org/docs/custom-widgets/#registereditorcomponent) accepts the `icon` property. Developers can specify a Material Symbols icon name just like [custom collection icons](#using-a-custom-icon-for-a-collection).
|
|
489
493
|
|
|
490
494
|
### Better localization
|
|
491
495
|
|
|
@@ -532,11 +536,11 @@ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are
|
|
|
532
536
|
|
|
533
537
|
- Comprehensive site config validation
|
|
534
538
|
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
|
|
539
|
+
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
535
540
|
- Field-specific media folders for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
|
|
536
541
|
- [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
537
|
-
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
538
542
|
- [Custom widgets](https://decapcms.org/docs/custom-widgets/)
|
|
539
|
-
- [Custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent): Support for
|
|
543
|
+
- [Custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent): Support for preview, Object/List widgets, and the `default` field option
|
|
540
544
|
- [Custom previews](https://decapcms.org/docs/customization/) ([#51](https://github.com/sveltia/sveltia-cms/issues/51))
|
|
541
545
|
- [Event hooks](https://decapcms.org/docs/registering-events/) ([#167](https://github.com/sveltia/sveltia-cms/issues/167))
|
|
542
546
|
|
|
@@ -903,6 +907,33 @@ collections:
|
|
|
903
907
|
slug: '{{uuid_short}}' # or {{uuid}} or {{uuid_shorter}}
|
|
904
908
|
```
|
|
905
909
|
|
|
910
|
+
### Configure multiple media libraries
|
|
911
|
+
|
|
912
|
+
The traditional [`media_library`](https://decapcms.org/docs/configuration-options/#media-library) option allows developers to configure only one media library:
|
|
913
|
+
|
|
914
|
+
```yaml
|
|
915
|
+
media_library:
|
|
916
|
+
name: default
|
|
917
|
+
config:
|
|
918
|
+
max_file_size: 1024000
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
Sveltia CMS has added support for multiple media libraries with the new `media_libraries` option. It can be used as a global option as well as a File/Image field option.
|
|
922
|
+
|
|
923
|
+
```yaml
|
|
924
|
+
media_libraries:
|
|
925
|
+
default:
|
|
926
|
+
config:
|
|
927
|
+
max_file_size: 1024000
|
|
928
|
+
cloudinary:
|
|
929
|
+
config:
|
|
930
|
+
cloud_name: your_cloud_name
|
|
931
|
+
api_key: your_api_key
|
|
932
|
+
uploadcare:
|
|
933
|
+
config:
|
|
934
|
+
publicKey: YOUR_UPLOADCARE_PUBLIC_KEY
|
|
935
|
+
```
|
|
936
|
+
|
|
906
937
|
### Editing data files with a top-level list
|
|
907
938
|
|
|
908
939
|
Sveltia CMS allows you to edit and save a list at the top-level of a data file, without a field name. All you need to do is create a single List field with the new `root` option set to `true`. The configuration below reproduces [this Jekyll data file example](https://jekyllrb.com/docs/datafiles/#example-list-of-members):
|
|
@@ -1398,7 +1429,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1398
1429
|
|
|
1399
1430
|
[^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)
|
|
1400
1431
|
|
|
1401
|
-
[^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), [#6965](https://github.com/decaporg/decap-cms/issues/6965), [#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) — 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).
|
|
1432
|
+
[^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), [#6965](https://github.com/decaporg/decap-cms/issues/6965), [#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) — 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).
|
|
1402
1433
|
|
|
1403
1434
|
[^114]: Netlify/Decap CMS [#5029](https://github.com/decaporg/decap-cms/issues/5029), [#5048](https://github.com/decaporg/decap-cms/issues/5048)
|
|
1404
1435
|
|
|
@@ -1561,3 +1592,5 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1561
1592
|
[^193]: Netlify/Decap CMS [#6800](https://github.com/decaporg/decap-cms/issues/6800)
|
|
1562
1593
|
|
|
1563
1594
|
[^194]: Netlify/Decap CMS [#7157](https://github.com/decaporg/decap-cms/issues/7157)
|
|
1595
|
+
|
|
1596
|
+
[^195]: Netlify/Decap CMS [#5901](https://github.com/decaporg/decap-cms/issues/5901)
|