@sveltia/cms 0.72.3 → 0.73.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 +33 -14
- package/dist/sveltia-cms.js +160 -158
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +166 -164
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/public.d.ts +27 -7
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
73
73
|
- [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
|
|
74
74
|
- [Configuring multiple media libraries](#configuring-multiple-media-libraries)
|
|
75
75
|
- [Optimizing images for upload](#optimizing-images-for-upload)
|
|
76
|
+
- [Disabling stock assets](#disabling-stock-assets)
|
|
76
77
|
- [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
|
|
77
78
|
- [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
|
|
78
79
|
- [Controlling data output](#controlling-data-output)
|
|
@@ -126,7 +127,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
126
127
|
- Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
|
|
127
128
|
- Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
|
|
128
129
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
129
|
-
- So far,
|
|
130
|
+
- So far, 195+ issues, or 400+ if including duplicates, have been effectively solved in Sveltia CMS
|
|
130
131
|
- Target:
|
|
131
132
|
- 200 issues, or 400 if including duplicates, by GA (almost there)
|
|
132
133
|
- 350 issues, or 600 if including duplicates, in the future
|
|
@@ -138,7 +139,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
138
139
|
- Responding to requests from the maintainer’s clients
|
|
139
140
|
- Making the code clean and maintainable
|
|
140
141
|
|
|
141
|
-
<br>
|
|
142
143
|
|
|
143
144
|
## Differentiators
|
|
144
145
|
|
|
@@ -154,7 +155,7 @@ Netlify/Decap CMS users will definitely be pleased and surprised by the numerous
|
|
|
154
155
|
- Mobile and tablet support: Users can manage content on-the-go.[^18] There are still rough edges though; we are working to fully optimize the app for small screens and touch devices.
|
|
155
156
|
- If you’re already signed in on your desktop, open the Account menu in the top right corner of the CMS, click Sign In with Mobile, and scan the QR code for passwordless sign-in. Your settings will be automatically copied.
|
|
156
157
|
- Made with [Svelte](https://svelte.dev/), not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common fatal React application crashes.[^113][^129] Best of all, Svelte offers great performance.
|
|
157
|
-
- Other fatal crashes in Netlify/Decap CMS are also irrelevant to us, making Sveltia CMS much more stable.[^112]
|
|
158
|
+
- Other fatal crashes in Netlify/Decap CMS are also irrelevant to us, making Sveltia CMS much more stable.[^112][^203][^204]
|
|
158
159
|
- We build [our own UI component library](https://github.com/sveltia/sveltia-ui), including custom dialogs,[^196] to ensure optimal usability without compromising accessibility.
|
|
159
160
|
- Users can personalize the application with various settings, including appearance and language. Developer Mode can also be enabled.
|
|
160
161
|
- Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available.[^31] Then update to the latest version with a single click.[^66]
|
|
@@ -489,10 +490,12 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
489
490
|
- View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
|
|
490
491
|
- Enhancements to media libraries:
|
|
491
492
|
- Supports multiple media libraries with the [new `media_libraries` option](#configuring-multiple-media-libraries).[^195]
|
|
492
|
-
- Integrates stock photo providers, including Pexels, Pixabay and Unsplash.[^8]
|
|
493
493
|
- Default media library
|
|
494
494
|
- It comes with a [built-in image optimizer](#optimizing-images-for-upload). With a few lines of configuration, images selected by users for upload are automatically converted to WebP format for reduced size,[^199] and it’s also possible to specify a maximum width and/or height.[^200] SVG images can also be optimized.
|
|
495
495
|
- 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](#configuring-multiple-media-libraries).
|
|
496
|
+
- Other integrations
|
|
497
|
+
- Integrates stock photo providers, including Pexels, Pixabay and Unsplash.[^8] Developers can [disable them](#disabling-stock-assets) if needed.
|
|
498
|
+
- More integration options, including Amazon S3 and Cloudflare R2, would be added in the future.
|
|
496
499
|
- The global `media_folder` can be an empty string (or `.` or `/`) if you want to store assets in the root folder.
|
|
497
500
|
- PDF documents are displayed with a thumbnail image in both the Asset Library and the Select File dialog, making it easier to find the file you’re looking for.[^38]
|
|
498
501
|
- Assets stored in an entry-relative media folder are displayed in the Asset Library.[^142]
|
|
@@ -522,7 +525,7 @@ However, 100% feature parity is not planned, and some features are still missing
|
|
|
522
525
|
|
|
523
526
|
### Features not to be implemented
|
|
524
527
|
|
|
525
|
-
- **Azure, Bitbucket and Forgejo backends**: For performance reasons. We may support these platforms if their APIs improve to allow the CMS to fetch multiple entries at once. The Gitea backend [may be implemented](https://github.com/sveltia/sveltia-cms/issues/198), but it won’t be compatible with Forgejo due to API differences.
|
|
528
|
+
- **Azure, Bitbucket and Forgejo backends**: For performance reasons. We may support these platforms if their APIs improve to allow the CMS to fetch multiple entries at once. The Gitea backend [may be implemented](https://github.com/sveltia/sveltia-cms/issues/198), but it won’t be [compatible with Forgejo](https://github.com/sveltia/sveltia-cms/issues/381) due to API differences.
|
|
526
529
|
- **Git Gateway backend**: Also for performance reasons. [Git Gateway](https://github.com/netlify/git-gateway) has not been actively maintained since Netlify CMS was abandoned, and it’s known to be slow and prone to rate limit violations. We plan to develop a GraphQL-based high-performance alternative in the future.
|
|
527
530
|
- **Netlify Identity Widget**: It’s not useful without Git Gateway, and the Netlify Identity service itself is now [deprecated](https://www.netlify.com/changelog/deprecation-netlify-identity/). We plan to develop an alternative solution with role support in the future, most likely using [Cloudflare Workers](https://workers.cloudflare.com/) and [Auth.js](https://authjs.dev/).
|
|
528
531
|
- The deprecated client-side implicit grant for the GitLab backend: It has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
|
|
@@ -593,11 +596,11 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
|
|
|
593
596
|
|
|
594
597
|
### Framework support
|
|
595
598
|
|
|
596
|
-
While Sveltia CMS is built with Svelte, the application is **framework-agnostic
|
|
599
|
+
While Sveltia CMS is built with Svelte, the application is **framework-agnostic**. It’s a small, compiled, vanilla JavaScript bundle that manages content in a Git repository directly via the REST/GraphQL API. It doesn’t interact with the framework that builds your site.
|
|
597
600
|
|
|
598
|
-
|
|
601
|
+
So you can use the CMS 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.
|
|
599
602
|
|
|
600
|
-
We have added support for features
|
|
603
|
+
We have added support for features used by certain frameworks and i18n libraries, such as [index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) and [slug localization](#localizing-entry-slugs) for Hugo, as well as [some enhancements](https://github.com/sveltia/sveltia-cms/issues/230) for VitePress. [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=feature) if your framework has specific needs.
|
|
601
604
|
|
|
602
605
|
### Browser support
|
|
603
606
|
|
|
@@ -635,7 +638,9 @@ Unfortunately, we are unable to provide free installation and setup support at t
|
|
|
635
638
|
|
|
636
639
|
### Migration
|
|
637
640
|
|
|
638
|
-
Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub or GitLab backend and don’t have any unsupported features like custom widgets or nested collections, migrating to Sveltia CMS is super easy — it works as a drop-in replacement.
|
|
641
|
+
Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub or GitLab backend and don’t have any unsupported features like custom widgets or nested collections, migrating to Sveltia CMS is super easy — it works as a drop-in replacement.
|
|
642
|
+
|
|
643
|
+
Open `/admin/index.html` locally with an editor like VS Code and replace the CMS `<script>` tag with the new one:
|
|
639
644
|
|
|
640
645
|
```html
|
|
641
646
|
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
|
|
@@ -655,9 +660,9 @@ From Decap CMS:
|
|
|
655
660
|
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
|
|
656
661
|
```
|
|
657
662
|
|
|
658
|
-
|
|
663
|
+
Next, let’s [test Sveltia CMS on your local machine](#working-with-a-local-git-repository). If everything looks good, push the change to your repository.
|
|
659
664
|
|
|
660
|
-
|
|
665
|
+
You can now open `https://[hostname]/admin/` as usual to start editing. There is even no authentication process if you’re already signed in with GitHub or GitLab on Netlify/Decap CMS because Sveltia CMS uses your auth token stored in the browser. Simple enough!
|
|
661
666
|
|
|
662
667
|
#### Migrating from Git Gateway backend
|
|
663
668
|
|
|
@@ -1042,6 +1047,16 @@ In case you’re not aware, [WebP](https://developers.google.com/speed/webp) off
|
|
|
1042
1047
|
- This feature is not intended for creating image variants in different formats and sizes. It should be done with a framework during the build process.
|
|
1043
1048
|
- We may add more transformation options in the future.
|
|
1044
1049
|
|
|
1050
|
+
### Disabling stock assets
|
|
1051
|
+
|
|
1052
|
+
The Select File/Image dialog includes some stock photo providers for convenience, but sometimes these may be irrelevant. Developers can hide them with the following configuration:
|
|
1053
|
+
|
|
1054
|
+
```yaml
|
|
1055
|
+
media_libraries:
|
|
1056
|
+
stock_assets:
|
|
1057
|
+
providers: []
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1045
1060
|
### Editing data files with a top-level list
|
|
1046
1061
|
|
|
1047
1062
|
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):
|
|
@@ -1456,7 +1471,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1456
1471
|
|
|
1457
1472
|
[^70]: Netlify/Decap CMS [#6482](https://github.com/decaporg/decap-cms/issues/6482)
|
|
1458
1473
|
|
|
1459
|
-
[^71]: Netlify/Decap CMS [#6999](https://github.com/decaporg/decap-cms/issues/6999), [#7000](https://github.com/decaporg/decap-cms/issues/7000), [#7001](https://github.com/decaporg/decap-cms/issues/7001), [#7152](https://github.com/decaporg/decap-cms/issues/7152), [#7220](https://github.com/decaporg/decap-cms/issues/7220), [#7283](https://github.com/decaporg/decap-cms/issues/7283), [#7316](https://github.com/decaporg/decap-cms/issues/7316), [#7429](https://github.com/decaporg/decap-cms/issues/7429)
|
|
1474
|
+
[^71]: Netlify/Decap CMS [#6999](https://github.com/decaporg/decap-cms/issues/6999), [#7000](https://github.com/decaporg/decap-cms/issues/7000), [#7001](https://github.com/decaporg/decap-cms/issues/7001), [#7152](https://github.com/decaporg/decap-cms/issues/7152), [#7220](https://github.com/decaporg/decap-cms/issues/7220), [#7283](https://github.com/decaporg/decap-cms/issues/7283), [#7316](https://github.com/decaporg/decap-cms/issues/7316), [#7429](https://github.com/decaporg/decap-cms/issues/7429), [#7465](https://github.com/decaporg/decap-cms/issues/7465)
|
|
1460
1475
|
|
|
1461
1476
|
[^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
|
|
1462
1477
|
|
|
@@ -1538,9 +1553,9 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1538
1553
|
|
|
1539
1554
|
[^111]: Netlify/Decap CMS [#7190](https://github.com/decaporg/decap-cms/issues/7190), [#7218](https://github.com/decaporg/decap-cms/issues/7218), [#7392](https://github.com/decaporg/decap-cms/issues/7392)
|
|
1540
1555
|
|
|
1541
|
-
[^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)
|
|
1556
|
+
[^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)
|
|
1542
1557
|
|
|
1543
|
-
[^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), [#7454](https://github.com/decaporg/decap-cms/issues/7454) — 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).
|
|
1558
|
+
[^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), [#7454](https://github.com/decaporg/decap-cms/issues/7454), [#7464](https://github.com/decaporg/decap-cms/issues/7464) — 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).
|
|
1544
1559
|
|
|
1545
1560
|
[^114]: Netlify/Decap CMS [#5029](https://github.com/decaporg/decap-cms/issues/5029), [#5048](https://github.com/decaporg/decap-cms/issues/5048)
|
|
1546
1561
|
|
|
@@ -1719,3 +1734,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1719
1734
|
[^201]: Netlify/Decap CMS [#7381](https://github.com/decaporg/decap-cms/issues/7381)
|
|
1720
1735
|
|
|
1721
1736
|
[^202]: Netlify/Decap CMS [#7458](https://github.com/decaporg/decap-cms/issues/7458)
|
|
1737
|
+
|
|
1738
|
+
[^203]: Netlify/Decap CMS [#7360](https://github.com/decaporg/decap-cms/issues/7360), [#7462](https://github.com/decaporg/decap-cms/issues/7462)
|
|
1739
|
+
|
|
1740
|
+
[^204]: Netlify/Decap CMS [#7240](https://github.com/decaporg/decap-cms/issues/7240), [#7428](https://github.com/decaporg/decap-cms/issues/7428)
|