@sveltia/cms 0.20.0 → 0.21.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 +54 -46
- package/dist/sveltia-cms.js +386 -318
- package/dist/sveltia-cms.mjs +627 -0
- package/package.json +17 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sveltia CMS
|
|
2
2
|
|
|
3
|
-
Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, quick replacement for Netlify CMS and [Decap CMS](https://decapcms.org/). In some simple cases, migration is as easy as a single line of code change, although we
|
|
3
|
+
Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, quick replacement for Netlify CMS and [Decap CMS](https://decapcms.org/). In some simple cases, migration is as easy as a single line of code change, although we are still working on improving compatibility. The free, open source, UX-focused alternative to Netlify/Decap CMS is now in public beta — with more features to come.
|
|
4
4
|
|
|
5
5
|
<br>
|
|
6
6
|
|
|
@@ -20,6 +20,18 @@ To achieve radical improvements in UX, performance, i18n and other areas, it was
|
|
|
20
20
|
|
|
21
21
|
Our goal is to make it a viable successor to Netlify CMS, expand the Git-based headless CMS market, empower small businesses and individuals who need a simple yet powerful CMS solution, and showcase the huge potential of the Svelte framework.
|
|
22
22
|
|
|
23
|
+
## Development status
|
|
24
|
+
|
|
25
|
+
**Sveltia CMS is still in beta**, so please be careful when trying it out.
|
|
26
|
+
|
|
27
|
+
While we are fixing reported bugs as fast as we can, the overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also involves different kinds of activities:
|
|
28
|
+
|
|
29
|
+
- Ensuring maximum compatibility with existing versions of Netlify/Decap CMS
|
|
30
|
+
- Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible (so far 75+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 100 by GA)
|
|
31
|
+
- Implementing our own enhancement ideas
|
|
32
|
+
|
|
33
|
+
At this point **we hope to ship version 1.0 in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates!
|
|
34
|
+
|
|
23
35
|
## Features
|
|
24
36
|
|
|
25
37
|
We are working hard to create a **much better alternative to Netlify CMS** and Decap CMS by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!
|
|
@@ -34,7 +46,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
34
46
|
|
|
35
47
|
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant UX improvements across the platform.
|
|
36
48
|
- Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
|
|
37
|
-
- Comes with touch device support. While the UI is not yet optimized for small screens, large tablets like iPad Pro or Pixel Tablet should work well.
|
|
49
|
+
- Comes with touch device support. While the UI is not yet optimized for small screens, large tablets like iPad Pro or Pixel Tablet should work well. Mobile support is planned after the 1.0 release.
|
|
38
50
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management.
|
|
39
51
|
- The screenshots above are worth a thousand words!
|
|
40
52
|
- Read on to learn about many other enhancements, including performance, productivity, accessibility, service integrations, and an all-new Asset Library.
|
|
@@ -42,7 +54,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
42
54
|
### Better performance
|
|
43
55
|
|
|
44
56
|
- Built completely from scratch with Svelte 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 almost any framework.
|
|
45
|
-
- Small footprint: The bundle size is less than
|
|
57
|
+
- Small footprint: The bundle size is less than 500 KB when minified and gzipped, which is much lighter than bloated Netlify CMS (1.5 MB) and Decap CMS (1.8 MB)[^57]. Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
46
58
|
- 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]. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
|
|
47
59
|
- 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/).
|
|
48
60
|
- A list of repository files is cached locally for faster startup and bandwidth savings.
|
|
@@ -52,11 +64,12 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
52
64
|
### Better productivity
|
|
53
65
|
|
|
54
66
|
- You can [work with a local Git repository](#working-with-a-local-git-repository) without any configuration or proxy server[^26].
|
|
55
|
-
- In addition to a streamlined workflow, it offers great performance
|
|
67
|
+
- In addition to a streamlined workflow, it offers great performance by loading files natively through the browser rather than using a slow, ad hoc API.
|
|
56
68
|
- It also allows you to bypass the 30 MB file size limit[^51].
|
|
57
69
|
- The `logo_url` defined in the configuration will be used[^49].
|
|
58
|
-
-
|
|
59
|
-
-
|
|
70
|
+
- Eliminates some workflow disruptions in the Content Editor:
|
|
71
|
+
- Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
|
|
72
|
+
- The editor closes automatically when an entry is saved.
|
|
60
73
|
- You can upload multiple assets at once. (See below)
|
|
61
74
|
- You can delete multiple entries and assets at once.
|
|
62
75
|
- Some keyboard shortcuts are available for faster editing. More to come!
|
|
@@ -77,9 +90,9 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
77
90
|
|
|
78
91
|
### Better security
|
|
79
92
|
|
|
80
|
-
- Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases[^
|
|
93
|
+
- Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases[^33].
|
|
81
94
|
- We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS.
|
|
82
|
-
- The `unsafe-eval`
|
|
95
|
+
- The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive[^34].
|
|
83
96
|
- The `same-origin` referrer policy is automatically set with a `<meta>` tag.
|
|
84
97
|
|
|
85
98
|
### Better backend support
|
|
@@ -87,6 +100,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
87
100
|
- Uses the GraphQL API where possible for better performance, as mentioned above. You don’t need to set the `use_graphql` option to enable it for GitHub and GitLab.
|
|
88
101
|
- The Git branch name is automatically set to the repository’s default branch (`main`, `master` or whatever) if not specified in the configuration file, preventing data loading errors due to a hardcoded fallback to `master`[^27].
|
|
89
102
|
- You can [disable automatic deployments](#disabling-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
|
|
103
|
+
- The GitLab backend comes with background service status checking, just like GitHub.
|
|
90
104
|
|
|
91
105
|
### Better i18n support
|
|
92
106
|
|
|
@@ -96,9 +110,11 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
96
110
|
- [Integrates DeepL](#using-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
97
111
|
- You can [disable non-default locale content](#disabling-non-default-locale-content)[^15].
|
|
98
112
|
- You can [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.
|
|
99
|
-
-
|
|
113
|
+
- Removes the [limitations in the List and Object widgets](https://decapcms.org/docs/i18n/#limitations) so that changes made with these widgets will be duplicated between locales as expected when using the `i18n: duplicate` field configuration[^7].
|
|
114
|
+
- Raises a validation error instead of an internal error if the `single_file` structure is used and a required field is not filled in any of the locales[^55].
|
|
100
115
|
- [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].
|
|
101
116
|
- Boolean fields are updated in real time between locales like other widgets to avoid confusion[^35].
|
|
117
|
+
- Solves problems with Chinese, Japanese and Korean (CJK) [IME](https://en.wikipedia.org/wiki/Input_method) text input in the rich text editor for the Markdown widget[^54].
|
|
102
118
|
|
|
103
119
|
### Better collections
|
|
104
120
|
|
|
@@ -138,6 +154,8 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
138
154
|
- An optional Object field can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
|
|
139
155
|
- Relation
|
|
140
156
|
- Field options are displayed with no additional API requests[^14]. The `options_length` property is therefore ignored.
|
|
157
|
+
- Select
|
|
158
|
+
- It’s possible to select an option with value `0`[^56].
|
|
141
159
|
- String
|
|
142
160
|
- Supports the `type` property that accepts `url` or `email` as a value, which will validate the value as a URL or email.
|
|
143
161
|
- Supports the `prefix` and `suffix` string properties, which automatically prepend and/or append the developer-defined value to the user-input value.
|
|
@@ -152,7 +170,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
152
170
|
- [Collection-specific assets](#using-a-custom-media-folder-for-a-collection) are listed for easy selection, while all assets are displayed in a separate tab[^19].
|
|
153
171
|
- A new asset can be uploaded by dragging & dropping it into the dialog[^20].
|
|
154
172
|
- A URL can also be entered in the dialog.
|
|
155
|
-
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8].
|
|
173
|
+
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More services will be added later.
|
|
156
174
|
- String, Text and Markdown
|
|
157
175
|
- A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
|
|
158
176
|
- New widgets
|
|
@@ -170,7 +188,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
170
188
|
- Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
171
189
|
- Copy the public URL, file path, text data or image data of a selected asset to clipboard.
|
|
172
190
|
- The file path starts with `/` as expected[^48].
|
|
173
|
-
- Edit
|
|
191
|
+
- Edit plain text assets, including SVG images.
|
|
174
192
|
- Replace existing assets.
|
|
175
193
|
- Download one or more selected assets at once.
|
|
176
194
|
- Delete one or more selected assets at once.
|
|
@@ -183,35 +201,29 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
183
201
|
|
|
184
202
|
## Compatibility
|
|
185
203
|
|
|
186
|
-
|
|
204
|
+
We are trying to make Sveltia CMS as compatible as possible with Netlify/Decap CMS before the 1.0 release, so that more users can seamlessly switch to our modern, powerful alternative. However, some features will be omitted due to performance and other factors. The table below shows the current limitations of Sveltia CMS:
|
|
187
205
|
|
|
188
206
|
| Feature | Status in Sveltia CMS |
|
|
189
207
|
| --- | --- |
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
| Collections | Nested collections are not supported
|
|
196
|
-
| Widgets | Custom widgets are not supported
|
|
197
|
-
| Customizations | Custom previews, custom formatters
|
|
208
|
+
| Backends | Only the GitHub and GitLab backends are available. We’ll add the Test backend for our demo site, but Azure, Bitbucket and Gitea are unlikely to be supported due to performance limitations. Netlify Git Gateway will not be supported for the same reason; we may implement a performant alternative sometime later. |
|
|
209
|
+
| Configuration | UI Locales are currently only available in English and Japanese. Comprehensive config validation is not yet implemented. |
|
|
210
|
+
| Media Libraries | We will add support for Cloudinary and Uploadcare soon. Deprecated Netlify Large Media will not be supported. |
|
|
211
|
+
| Workflow | Editorial Workflow and Open Authoring are not yet supported. |
|
|
212
|
+
| Content Editor | Auto-saving a draft entry is not yet implemented. |
|
|
213
|
+
| Collections | Nested collections are not yet supported. |
|
|
214
|
+
| Widgets | Custom widgets are not yet supported. [See below](#widget-limitations) for other limitations. |
|
|
215
|
+
| Customizations | Custom previews, custom formatters and event subscriptions are not yet supported. |
|
|
198
216
|
|
|
199
217
|
### Widget limitations
|
|
200
218
|
|
|
201
219
|
| Widget | Status in Sveltia CMS |
|
|
202
220
|
| --- | --- |
|
|
203
|
-
| Code | Not supported
|
|
221
|
+
| Code | Not yet supported. |
|
|
204
222
|
| Date | Sveltia CMS has dropped the support for the deprecated widget following Decap CMS 3.0. Use the DateTime widget instead. |
|
|
205
|
-
| DateTime | The `date_format` and `time_format` options with Moment.js tokens are not supported
|
|
206
|
-
| File/Image | Field-specific media folders and media library options are not supported
|
|
207
|
-
| Map | Not supported
|
|
208
|
-
| Markdown | Editor components are not supported
|
|
209
|
-
|
|
210
|
-
### Other features
|
|
211
|
-
|
|
212
|
-
- Comprehensive config validation is not implemented yet.
|
|
213
|
-
- Auto-saving a draft entry is not implemented yet.
|
|
214
|
-
- [Backend health check](https://www.githubstatus.com/api) is not implemented yet.
|
|
223
|
+
| DateTime | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note: Decap CMS 3.1 has replaced Moment.js with [Day.js](https://day.js.org/); we’ll follow the change soon. |
|
|
224
|
+
| File/Image | Field-specific media folders and media library options are not yet supported other than `media_library.config.max_file_size` for the default media library. |
|
|
225
|
+
| Map | Not yet supported. |
|
|
226
|
+
| Markdown | Editor components are not yet supported. Remark plugins will not be supported as they are not compatible with our Lexical-based rich text editor. |
|
|
215
227
|
|
|
216
228
|
## Roadmap
|
|
217
229
|
|
|
@@ -257,20 +269,22 @@ From Netlify CMS:
|
|
|
257
269
|
|
|
258
270
|
```diff
|
|
259
271
|
-<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
|
260
|
-
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"
|
|
272
|
+
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
|
|
261
273
|
```
|
|
262
274
|
|
|
263
275
|
From Decap CMS:
|
|
264
276
|
|
|
265
277
|
```diff
|
|
266
278
|
-<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
|
267
|
-
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"
|
|
279
|
+
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
|
|
268
280
|
```
|
|
269
281
|
|
|
270
282
|
That’s it! You can open `https://[hostname]/admin/` as before to start editing. There is even no authentication process if you’ve already been signed in with GitHub or GitLab on Netlify/Decap CMS because Sveltia CMS uses your auth token stored in the browser. Simple enough!
|
|
271
283
|
|
|
272
284
|
That said, we strongly recommend testing your new Sveltia CMS instance first on your local machine. [See below](#working-with-a-local-git-repository) for how.
|
|
273
285
|
|
|
286
|
+
For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS. Make sure to keep the dependency up to date!
|
|
287
|
+
|
|
274
288
|
### Updates
|
|
275
289
|
|
|
276
290
|
Updating Sveltia CMS is transparent, unless you include a specific version in the `<script>` source URL. Whenever you (re)load the CMS, the latest version will be served via [UNPKG](https://unpkg.com/). The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (`^1.0.0`) like Netlify/Decap CMS.
|
|
@@ -440,7 +454,7 @@ And combine the following policies depending on your Git backend and enabled int
|
|
|
440
454
|
- GitLab: (If you’re running a self-hosted instance, you’ll also need to add the origin to these directives.)
|
|
441
455
|
```csp
|
|
442
456
|
img-src https://gitlab.com https://secure.gravatar.com;
|
|
443
|
-
connect-src https://gitlab.com;
|
|
457
|
+
connect-src https://gitlab.com https://status-api.hostedstatus.com;
|
|
444
458
|
```
|
|
445
459
|
- Pexels:
|
|
446
460
|
```csp
|
|
@@ -483,16 +497,6 @@ If you have image field(s) and expect that images will be inserted as URLs, you
|
|
|
483
497
|
img-src 'self' blob: data: https://*;
|
|
484
498
|
```
|
|
485
499
|
|
|
486
|
-
### Self-hosting the CMS
|
|
487
|
-
|
|
488
|
-
Sveltia CMS is open source for sure! You can host it on your server rather than loading it from UNPKG, though it’s not recommended due to missing bug fixes. Simply copy the latest [`sveltia-cms.js`](https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js) file from the CDN, or build it yourself:
|
|
489
|
-
|
|
490
|
-
1. Clone this Git repository.
|
|
491
|
-
1. Run `pnpm install && pnpm build` at the project root.
|
|
492
|
-
1. `sveltia-cms.js` will be generated under the `dist` directory.
|
|
493
|
-
|
|
494
|
-
Importing the CMS as an npm package is not supported yet.
|
|
495
|
-
|
|
496
500
|
## Support & feedback
|
|
497
501
|
|
|
498
502
|
Visit the [Discussions](https://github.com/sveltia/sveltia-cms/discussions) page on this GitHub repository and start a new discussion. Tell us about your use cases!
|
|
@@ -547,7 +551,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
547
551
|
[^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
|
|
548
552
|
[^30]: Netlify/Decap CMS [#565](https://github.com/decaporg/decap-cms/issues/565)
|
|
549
553
|
[^31]: Netlify/Decap CMS [#1045](https://github.com/decaporg/decap-cms/issues/1045), [#3353](https://github.com/decaporg/decap-cms/issues/3353)
|
|
550
|
-
[^32]: Netlify/Decap CMS [#302](https://github.com/decaporg/decap-cms/issues/302), [#5549](https://github.com/decaporg/decap-cms/issues/5549)
|
|
554
|
+
[^32]: Netlify/Decap CMS [#302](https://github.com/decaporg/decap-cms/issues/302), [#5549](https://github.com/decaporg/decap-cms/issues/5549), [#6034](https://github.com/decaporg/decap-cms/issues/6034)
|
|
551
555
|
[^33]: Netlify/Decap CMS [#6513](https://github.com/decaporg/decap-cms/issues/6513)
|
|
552
556
|
[^34]: Netlify/Decap CMS [#2138](https://github.com/decaporg/decap-cms/issues/2138)
|
|
553
557
|
[^35]: Netlify/Decap CMS [#7086](https://github.com/decaporg/decap-cms/issues/7086)
|
|
@@ -565,7 +569,11 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
565
569
|
[^47]: Netlify/Decap CMS [#2370](https://github.com/decaporg/decap-cms/issues/2370), [#5596](https://github.com/decaporg/decap-cms/issues/5596)
|
|
566
570
|
[^48]: Netlify/Decap CMS [#5569](https://github.com/decaporg/decap-cms/issues/5569)
|
|
567
571
|
[^49]: Netlify/Decap CMS [#5752](https://github.com/decaporg/decap-cms/issues/5752)
|
|
568
|
-
[^50]: Netlify/Decap CMS [#4646](https://github.com/decaporg/decap-cms/issues/4646)
|
|
572
|
+
[^50]: Netlify/Decap CMS [#4646](https://github.com/decaporg/decap-cms/issues/4646), [#7167](https://github.com/decaporg/decap-cms/issues/7167)
|
|
569
573
|
[^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)
|
|
570
574
|
[^52]: Netlify/Decap CMS [#7147](https://github.com/decaporg/decap-cms/issues/7147)
|
|
571
575
|
[^53]: Netlify/Decap CMS [#5673](https://github.com/decaporg/decap-cms/issues/5673), [#6482](https://github.com/decaporg/decap-cms/issues/6482), [#6707](https://github.com/decaporg/decap-cms/issues/6707), [#6999](https://github.com/decaporg/decap-cms/issues/6999), [#7047](https://github.com/decaporg/decap-cms/issues/7047), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7152](https://github.com/decaporg/decap-cms/issues/7152)
|
|
576
|
+
[^54]: Netlify/Decap CMS [#1347](https://github.com/decaporg/decap-cms/issues/1347), [#4629](https://github.com/decaporg/decap-cms/issues/4629), [#6287](https://github.com/decaporg/decap-cms/issues/6287) — Decap 3.0 updated the Slate editor in an attempt to fix the problems, but the IME issues remain unresolved when using a mobile/tablet browser.
|
|
577
|
+
[^55]: Netlify/Decap CMS [#4480](https://github.com/decaporg/decap-cms/issues/4480), [#6353](https://github.com/decaporg/decap-cms/issues/6353)
|
|
578
|
+
[^56]: Netlify/Decap CMS [#6515](https://github.com/decaporg/decap-cms/issues/6515)
|
|
579
|
+
[^57]: Netlify/Decap CMS [#328](https://github.com/decaporg/decap-cms/issues/328), [#3853](https://github.com/decaporg/decap-cms/issues/3853)
|