@sveltia/cms 0.39.17 → 0.40.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 +67 -14
- package/dist/sveltia-cms.js +426 -353
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +434 -361
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -12,6 +12,61 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
12
12
|
|
|
13
13
|
<br>
|
|
14
14
|
|
|
15
|
+
## Table of contents
|
|
16
|
+
|
|
17
|
+
- [Motivation](#motivation)
|
|
18
|
+
- [Our advantage](#our-advantage)
|
|
19
|
+
- [Our goals](#our-goals)
|
|
20
|
+
- [Development status](#development-status)
|
|
21
|
+
- [Differentiators](#differentiators)
|
|
22
|
+
- [Better UX](#better-ux)
|
|
23
|
+
- [Better performance](#better-performance)
|
|
24
|
+
- [Better productivity](#better-productivity)
|
|
25
|
+
- [Better accessibility](#better-accessibility)
|
|
26
|
+
- [Better security](#better-security)
|
|
27
|
+
- [Better configuration](#better-configuration)
|
|
28
|
+
- [Better backend support](#better-backend-support)
|
|
29
|
+
- [Better i18n support](#better-i18n-support)
|
|
30
|
+
- [Better collections](#better-collections)
|
|
31
|
+
- [Better content editing](#better-content-editing)
|
|
32
|
+
- [Better data output](#better-data-output)
|
|
33
|
+
- [Better widgets](#better-widgets)
|
|
34
|
+
- [New widgets](#new-widgets)
|
|
35
|
+
- [Better asset management](#better-asset-management)
|
|
36
|
+
- [Compatibility](#compatibility)
|
|
37
|
+
- [Features not to be implemented](#features-not-to-be-implemented)
|
|
38
|
+
- [Current limitations](#current-limitations)
|
|
39
|
+
- [Roadmap](#roadmap)
|
|
40
|
+
- [Before the 1.0 release](#before-the-10-release)
|
|
41
|
+
- [After the 1.0 release](#after-the-10-release)
|
|
42
|
+
- [Getting started](#getting-started)
|
|
43
|
+
- [New users](#new-users)
|
|
44
|
+
- [Migration](#migration)
|
|
45
|
+
- [Installing with npm](#installing-with-npm)
|
|
46
|
+
- [Updates](#updates)
|
|
47
|
+
- [Tips \& tricks](#tips--tricks)
|
|
48
|
+
- [Providing a JSON configuration file](#providing-a-json-configuration-file)
|
|
49
|
+
- [Migrating from Git Gateway backend](#migrating-from-git-gateway-backend)
|
|
50
|
+
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
51
|
+
- [Working around authentication error](#working-around-authentication-error)
|
|
52
|
+
- [Working with a local Git repository](#working-with-a-local-git-repository)
|
|
53
|
+
- [Enabling local development in Brave](#enabling-local-development-in-brave)
|
|
54
|
+
- [Using a custom icon for a collection](#using-a-custom-icon-for-a-collection)
|
|
55
|
+
- [Adding dividers to the collection list](#adding-dividers-to-the-collection-list)
|
|
56
|
+
- [Using a custom media folder for a collection](#using-a-custom-media-folder-for-a-collection)
|
|
57
|
+
- [Using keyboard shortcuts](#using-keyboard-shortcuts)
|
|
58
|
+
- [Using DeepL to translate entry fields](#using-deepl-to-translate-entry-fields)
|
|
59
|
+
- [Localizing entry slugs](#localizing-entry-slugs)
|
|
60
|
+
- [Disabling non-default locale content](#disabling-non-default-locale-content)
|
|
61
|
+
- [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
|
|
62
|
+
- [Disabling automatic deployments](#disabling-automatic-deployments)
|
|
63
|
+
- [Setting up Content Security Policy](#setting-up-content-security-policy)
|
|
64
|
+
- [Support \& feedback](#support--feedback)
|
|
65
|
+
- [Contributions](#contributions)
|
|
66
|
+
- [Related links](#related-links)
|
|
67
|
+
- [As seen on](#as-seen-on)
|
|
68
|
+
- [Disclaimer](#disclaimer)
|
|
69
|
+
|
|
15
70
|
## Motivation
|
|
16
71
|
|
|
17
72
|
Sveltia CMS was born in November 2022, when the progress of Netlify CMS was stalled for more than six months. [@kyoshino](https://github.com/kyoshino)’s clients wanted to replace their Netlify CMS instances without much effort, mainly to get better internationalization (i18n) support.
|
|
@@ -56,36 +111,31 @@ Sveltia CMS **version 1.0 is expected to ship by the end of 2024**. Check our [r
|
|
|
56
111
|
|
|
57
112
|
<br>
|
|
58
113
|
|
|
59
|
-
##
|
|
114
|
+
## Differentiators
|
|
60
115
|
|
|
61
116
|
We are working hard to create a **significantly better alternative to Netlify CMS and Decap CMS** by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!
|
|
62
117
|
|
|
63
|
-
### Compatible with Netlify/Decap CMS
|
|
64
|
-
|
|
65
|
-
- Ready to be used as a drop-in replacement for Netlify/Decap CMS _in some casual use case scenarios_ with a single line of code update.
|
|
66
|
-
- Your existing [configuration file](https://decapcms.org/docs/configuration-options/) can be reused as is.
|
|
67
|
-
- However, some features are still missing or will not be added, most notably Git Gateway and Netlify Identity. Look at the [compatibility info](#compatibility) below to see if you can migrate now or soon.
|
|
68
|
-
|
|
69
118
|
### Better UX
|
|
70
119
|
|
|
71
120
|
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
|
|
72
121
|
- Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
|
|
73
122
|
- Comes with touch device support, such as larger buttons for easier tapping. While the UI is not yet optimized for small screens, it should work well with large tablets like iPad Pro or Pixel Tablet. Mobile support and other optimizations such as swipe navigation are planned after the 1.0 release.
|
|
74
123
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common fatal application crashes[^113][^129]. Best of all, Svelte offers unmatched performance!
|
|
75
|
-
- The
|
|
124
|
+
- The Help menu provides all links to useful resources, including release notes, feedback and support.
|
|
76
125
|
- Users can customize the application with various settings.
|
|
77
126
|
- 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].
|
|
78
127
|
- The screenshots above are worth a thousand words, but read on to learn about many other improvements in detail.
|
|
79
128
|
|
|
80
129
|
### Better performance
|
|
81
130
|
|
|
82
|
-
- 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 any framework that can load static data files during the build process.
|
|
131
|
+
- 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 any framework or static site generator (SSG) that can load static data files during the build process.
|
|
83
132
|
- Small footprint: The bundle size is less than 450 KB when minified and brotlied, which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.8 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet. That’s the power of Svelte + Vite.
|
|
84
|
-
- We have upgraded from Svelte 4 to [Svelte 5 Release Candidate](https://svelte.dev/blog/svelte-5-release-candidate) to further
|
|
133
|
+
- We have upgraded from Svelte 4 to [Svelte 5 Release Candidate](https://svelte.dev/blog/svelte-5-release-candidate) to further improve performance, including an even smaller bundle size. A full migration to the _runes_ reactivity API will follow.
|
|
85
134
|
- Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
86
135
|
- 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]. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
|
|
87
136
|
- 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/).
|
|
88
137
|
- Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
|
|
138
|
+
- Sorting, filtering and grouping of entries is done instantly without reloading the entire content.
|
|
89
139
|
- Thumbnails of assets, including videos and PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
|
|
90
140
|
- No typing lag on input widgets, especially within nested lists and objects[^77].
|
|
91
141
|
|
|
@@ -137,6 +187,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
137
187
|
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
|
|
138
188
|
- Service status checks are performed frequently and an incident notification is displayed prominently.
|
|
139
189
|
- You can quickly open the source file of an entry or asset in your repository using View on GitHub (or GitLab) under the 3-dot menu.
|
|
190
|
+
- We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
|
|
140
191
|
- You won’t get a 404 Not Found error when you sign in to the GitLab backend[^115].
|
|
141
192
|
- Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
|
|
142
193
|
- You can select the local and remote backends while working on a local server.
|
|
@@ -184,6 +235,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
184
235
|
- Single quotes in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
185
236
|
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
186
237
|
- Entry listing
|
|
238
|
+
- The collection list displays the number of items in each collection.
|
|
187
239
|
- A folder collection filter with a boolean value works as expected[^93].
|
|
188
240
|
- Hugo’s special `_index.md` files are ignored in folder collections unless the `path` option is configured to end with `_index` and the `extension` is `md`[^120]. You can still manage these files as part of a file collection if necessary.
|
|
189
241
|
- If there was an error while parsing an entry file, such as duplicate front matter keys, it won’t show up as a blank entry, and a clear error message will be displayed in the browser console[^121].
|
|
@@ -267,6 +319,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
267
319
|
- A new asset can be uploaded by dragging & dropping it into the dialog[^20].
|
|
268
320
|
- A URL can also be entered in the dialog.
|
|
269
321
|
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More stock photo providers will be added in the future.
|
|
322
|
+
- You can also simply drag and drop a file onto a File/Image field to attach it without having to open the Select File dialog.
|
|
270
323
|
- Large images automatically fit in the preview pane instead of being displayed at their original size, which can easily exceed the width of the pane.
|
|
271
324
|
- List and Object
|
|
272
325
|
- The `summary` is displayed correctly when it refers to a Relation field[^36] or a simple List field.
|
|
@@ -312,7 +365,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
312
365
|
|
|
313
366
|
## Compatibility
|
|
314
367
|
|
|
315
|
-
We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern, powerful, high performance alternative. However, some features will be omitted due to deprecations and other factors.
|
|
368
|
+
We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern, powerful, high performance alternative. It’s ready to be used as a drop-in replacement for Netlify/Decap CMS _in some casual use case scenarios_ with a [single line of code update](#migration). However, some features will be omitted due to deprecations and other factors. Look at the compatibility info below to see if you can migrate now or soon.
|
|
316
369
|
|
|
317
370
|
### Features not to be implemented
|
|
318
371
|
|
|
@@ -589,7 +642,7 @@ collections:
|
|
|
589
642
|
label: Blog posts
|
|
590
643
|
create: true
|
|
591
644
|
folder: data/posts/
|
|
592
|
-
slug: '{{title | localize}}'
|
|
645
|
+
slug: '{{title | localize}}' # This does the trick
|
|
593
646
|
format: yaml
|
|
594
647
|
i18n: true
|
|
595
648
|
fields:
|
|
@@ -631,7 +684,7 @@ i18n:
|
|
|
631
684
|
|
|
632
685
|
### Disabling non-default locale content
|
|
633
686
|
|
|
634
|
-
You can
|
|
687
|
+
You can disable output of content in selected non-default locales by adding the `save_all_locales` property to the top-level or per-collection `i18n` configuration. Then you’ll find “Disable (locale name)” in the three-dot menu in the top right corner of the content editor. This is useful if the translation isn’t ready yet, but you want to publish the default locale content first.
|
|
635
688
|
|
|
636
689
|
With the following configuration, you can disable the French and/or German translation while writing in English.
|
|
637
690
|
|
|
@@ -1041,7 +1094,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1041
1094
|
|
|
1042
1095
|
[^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)
|
|
1043
1096
|
|
|
1044
|
-
[^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) — These `removeChild` crashes are common in React apps and seem to be caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).
|
|
1097
|
+
[^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), [#7301](https://github.com/decaporg/decap-cms/issues/7301) — These `removeChild` crashes are common in React apps and seem to be caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).
|
|
1045
1098
|
|
|
1046
1099
|
[^114]: Netlify/Decap CMS [#5029](https://github.com/decaporg/decap-cms/issues/5029), [#5048](https://github.com/decaporg/decap-cms/issues/5048)
|
|
1047
1100
|
|