@sveltia/cms 0.9.9 → 0.11.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/LICENSE.txt +1 -1
- package/README.md +34 -47
- package/dist/sveltia-cms.js +181 -179
- package/package.json +14 -13
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
|
@@ -49,7 +49,8 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
49
49
|
|
|
50
50
|
### Better productivity
|
|
51
51
|
|
|
52
|
-
- You can [work on a local Git repository](#work-with-a-local-git-repository) without having to run a proxy server on your machine.
|
|
52
|
+
- You can [work on a local Git repository](#work-with-a-local-git-repository) without having to run a proxy server on your machine[^26].
|
|
53
|
+
- 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 fallback to `master`[^27].
|
|
53
54
|
- You can delete multiple entries and assets at once.
|
|
54
55
|
- Some keyboard shortcuts are available for faster editing. More to come!
|
|
55
56
|
- Create a new entry: `Ctrl+E` (Windows/Linux) / `Command+E` (macOS)
|
|
@@ -71,19 +72,24 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
71
72
|
- Fields in non-default locales are validated as expected[^13].
|
|
72
73
|
- [Integrates DeepL](#use-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
73
74
|
- You can [disable non-default locale content](#disable-non-default-locale-content)[^15].
|
|
74
|
-
- You can [use a random UUID for an entry slug](#use-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters[^12]
|
|
75
|
-
-
|
|
76
|
-
-
|
|
75
|
+
- You can [use a random UUID for an entry slug](#use-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters. Sveltia CMS also supports the proposed `uuid` widget with the following properties[^12]:
|
|
76
|
+
- `prefix`: A string to be prepended to the value. Default: an empty string.
|
|
77
|
+
- `use_b32_encoding`: Whether to encode the value with Base32. Default: `false`.
|
|
78
|
+
- `read_only`: Whether to make the field read-only. Default: `true`.
|
|
79
|
+
- Resolves 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].
|
|
80
|
+
- [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].
|
|
77
81
|
|
|
78
82
|
### Better collections
|
|
79
83
|
|
|
80
84
|
- You can choose a [custom icon for each collection](#use-a-custom-icon-for-a-collection)[^3].
|
|
81
85
|
- A [per-collection media folder](#use-a-custom-media-folder-for-a-collection) will appear next to the entries.
|
|
82
86
|
- String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
|
|
87
|
+
- Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
|
|
83
88
|
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
84
89
|
|
|
85
90
|
### Better fields/widgets
|
|
86
91
|
|
|
92
|
+
- The Boolean, Number and String widgets support the `prefix` and `suffix` properties, allowing developers to display custom messages before and/or after the field[^28].
|
|
87
93
|
- Relation field options are displayed with no additional API requests[^14]. The `options_length` property is therefore ignored.
|
|
88
94
|
- Required fields, not optional fields, are clearly marked for efficient data entry.
|
|
89
95
|
- Provides a reimagined all-in-one asset selection dialog for file and image fields.
|
|
@@ -91,6 +97,7 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
91
97
|
- New assets can be uploaded by dragging & dropping them into the dialog[^20].
|
|
92
98
|
- A file/image URL can also be entered in the dialog.
|
|
93
99
|
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert free stock photos[^8].
|
|
100
|
+
- The Object widget supports [variable types](https://decapcms.org/docs/variable-type-widgets/) just like the List widget. This allows you to have dependent fields in a collection[^30].
|
|
94
101
|
- Optional object fields (`widget: object` with `required: false`) can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
|
|
95
102
|
- You can revert changes to all fields or a specific field.
|
|
96
103
|
|
|
@@ -104,20 +111,21 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
104
111
|
|
|
105
112
|
## Compatibility
|
|
106
113
|
|
|
107
|
-
While it’s not our goal to recreate all the features found in Netlify/Decap CMS, we plan to maximize compatibility before the 1.0 release so that more users can migrate to our modern alternative.
|
|
114
|
+
While it’s not our goal to recreate all the features found in Netlify/Decap CMS, we plan to maximize compatibility before the 1.0 release so that more users can migrate to our modern alternative. The table below is a summary of the current limitations of Sveltia CMS:
|
|
108
115
|
|
|
109
116
|
| Feature | Status in Sveltia CMS |
|
|
110
117
|
| --- | --- |
|
|
111
118
|
| Installation | Installing with npm is not supported yet. |
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
119
|
+
| Backends | Only the GitHub backend is available at this time. Sveltia CMS uses the GraphQL by default for a better performance; it cannot be disabled. The GitLab backend will be available soon. We plan to add the Test backend as well for our demo site as well, but Azure and Bitbucket will probably not be supported, mainly due to the lack of a method to fetch content in bulk. We have not looked into the relatively new Gitea backend yet. |
|
|
120
|
+
| Netlify Integration | Identity Widget is not supported yet. We will not support Git Gateway due to the poor performance; we may implement an alternative using GraphQL later. |
|
|
121
|
+
| Local Git Repository | Supported using a different approach. [See below](#work-with-a-local-git-repository) for details. |
|
|
122
|
+
| UI Locales | Only English and Japanese are available at this time. No registration is needed. While the UI locale is automatically selected depending on the browser’s language settings, it can be changed in Settings. (Click on the Account button in the top right corner of the CMS.) |
|
|
123
|
+
| Media Libraries | External media storage services are not supported yet. We will add support for Cloudinary and Uploadcare in a better way, but will not support deprecated Netlify Large Media. |
|
|
116
124
|
| Editorial Workflow | Not supported yet. |
|
|
117
|
-
|
|
|
125
|
+
| Open Authoring | Not supported yet. |
|
|
126
|
+
| Collections | Nested collections are not supported yet. |
|
|
118
127
|
| Widgets | [See below](#widget-limitations) for the current limitations. |
|
|
119
|
-
| Custom widgets
|
|
120
|
-
| Custom previews | Not supported yet. |
|
|
128
|
+
| Customizations | Custom widgets, custom previews, custom formatters, manual initialization and CMS event subscriptions are not supported yet. |
|
|
121
129
|
|
|
122
130
|
### Widget limitations
|
|
123
131
|
|
|
@@ -125,41 +133,15 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
|
|
|
125
133
|
| --- | --- |
|
|
126
134
|
| Code | Not supported yet. |
|
|
127
135
|
| Color | The `enableAlpha` option is not supported yet. |
|
|
128
|
-
| Date
|
|
136
|
+
| Date | Sveltia CMS has dropped the support for it following Decap CMS 3.0. Use the DateTime widget instead. |
|
|
137
|
+
| DateTime | The `date_format` and `time_format` options with Moment.js tokens are not supported yet. Note: Decap CMS 3.1 has replaced Moment.js with [Day.js](https://day.js.org/); we’ll follow the change soon. |
|
|
129
138
|
| File/Image | Field-specific media folders and media library options are not supported yet other than `media_library.config.max_file_size` for the default media library. |
|
|
130
139
|
| Map | Not supported yet. |
|
|
131
|
-
| Markdown | It’s a plain text editor at this time. A rich text editor is coming soon. |
|
|
140
|
+
| Markdown | It’s a plain text editor at this time. A rich text editor is coming soon. We will not support Remark plugins. |
|
|
132
141
|
| Relation | The `search_fields` option is not supported yet. |
|
|
133
142
|
|
|
134
|
-
### Beta features in Netlify/Decap CMS
|
|
135
|
-
|
|
136
|
-
| Feature | Status in Sveltia CMS |
|
|
137
|
-
| --- | --- |
|
|
138
|
-
| Working with a Local Git Repository | Supported. [See below](#work-with-a-local-git-repository) for details. |
|
|
139
|
-
| GitLab and BitBucket Editorial Workflow Support | Editorial workflow is not supported yet. |
|
|
140
|
-
| i18n Support | Supported. In fact, i18n is at the core of Sveltia CMS! |
|
|
141
|
-
| GitHub GraphQL API | Supported. Sveltia CMS uses GraphQL by default for a better performance. It cannot be disabled. |
|
|
142
|
-
| GitLab GraphQL API | The GitLab backend is not supported yet. |
|
|
143
|
-
| Open Authoring | Not supported yet. |
|
|
144
|
-
| Folder Collections Path | Supported. |
|
|
145
|
-
| Folder Collections Media and Public Folder | Supported. We recommend using [absolute path per-collection folders](#use-a-custom-media-folder-for-a-collection) for easier asset management rather than relative path per-entry folders. |
|
|
146
|
-
| List Widget: Variable Types | Supported. |
|
|
147
|
-
| Custom Mount Element | Supported. |
|
|
148
|
-
| Manual Initialization | Not supported yet. |
|
|
149
|
-
| Raw CSS in registerPreviewStyle | Not supported yet. |
|
|
150
|
-
| Squash merge GitHub pull requests | Editorial workflow is not supported yet. |
|
|
151
|
-
| Commit Message Templates | Supported. |
|
|
152
|
-
| Image widget file size limit | Supported. |
|
|
153
|
-
| Summary string template transformations | Supported. |
|
|
154
|
-
| Registering to CMS Events | Not supported yet. |
|
|
155
|
-
| Dynamic Default Values | Supported. |
|
|
156
|
-
| Nested Collections | Not supported yet. |
|
|
157
|
-
| Remark plugins | Not supported yet. |
|
|
158
|
-
| Custom formatters | Not supported yet. |
|
|
159
|
-
|
|
160
143
|
### Other features
|
|
161
144
|
|
|
162
|
-
- Netlify Identity Widget is not supported yet.
|
|
163
145
|
- Comprehensive config validation is not implemented yet.
|
|
164
146
|
- Auto-saving a draft entry is not implemented yet.
|
|
165
147
|
- Downloading an asset and copying the file path of an asset in the media library is not implemented yet.
|
|
@@ -187,7 +169,7 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
|
|
|
187
169
|
|
|
188
170
|
### New users
|
|
189
171
|
|
|
190
|
-
Currently, Sveltia CMS is
|
|
172
|
+
Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Then migrate to Sveltia CMS as described below.
|
|
191
173
|
|
|
192
174
|
As the product evolves, we’ll implement a built-in configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.
|
|
193
175
|
|
|
@@ -220,13 +202,13 @@ You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](
|
|
|
220
202
|
|
|
221
203
|
### Work with a local Git repository
|
|
222
204
|
|
|
223
|
-
You can use Sveltia CMS with a local Git repository
|
|
205
|
+
You can use Sveltia CMS with a local Git repository like [Netlify/Decap CMS](https://decapcms.org/docs/working-with-a-local-git-repository/), but Sveltia CMS has simplified the workflow by removing the need for additional configuration (the `local_backend` property) and proxy server, thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/) available in [some modern browsers](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility).
|
|
224
206
|
|
|
225
207
|
1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
|
|
226
208
|
1. Visit `http://localhost:[port]/admin/index.html` with Chrome or Edge. The port number varies by framework.
|
|
227
209
|
- Other Chromium-based browsers may also work. In Brave, you need to enable the File System Access API [with a flag](https://github.com/brave/brave-browser/issues/20563#issuecomment-1021567573).
|
|
228
210
|
1. Click “Work with Local Repository” and select the project’s root directory once prompted.
|
|
229
|
-
- If you’re using Windows Subsystem for Linux (WSL), you may get an error saying “Can’t open this folder because it contains system files.” This is due to a limitation in the browser, and you can try some workarounds mentioned in [this issue](https://github.com/coder/code-server/issues/4646).
|
|
211
|
+
- If you’re using Windows Subsystem for Linux (WSL), you may get an error saying “Can’t open this folder because it contains system files.” This is due to a limitation in the browser, and you can try some workarounds mentioned in [this issue](https://github.com/coder/code-server/issues/4646) and [this thread](https://github.com/sveltia/sveltia-cms/discussions/101).
|
|
230
212
|
1. Make some changes to your content on Sveltia CMS.
|
|
231
213
|
1. See if the produced changes look good using `git diff` or a GUI like [GitHub Desktop](https://desktop.github.com/).
|
|
232
214
|
1. Open the dev site at `http://localhost:[port]/` to check the rendered pages.
|
|
@@ -255,7 +237,7 @@ You can have an icon for each collection for easy identification in the collecti
|
|
|
255
237
|
|
|
256
238
|
### Use a custom media folder for a collection
|
|
257
239
|
|
|
258
|
-
This is actually not new in Sveltia CMS but rather an _undocumented_ feature in Netlify/Decap CMS[^4]. You can specify media and public folders for each collection that override the [global media folder](https://decapcms.org/docs/configuration-options/#media-and-public-folders). Well, it’s [documented](https://decapcms.org/docs/
|
|
240
|
+
This is actually not new in Sveltia CMS but rather an _undocumented_ feature in Netlify/Decap CMS[^4]. You can specify media and public folders for each collection that override the [global media folder](https://decapcms.org/docs/configuration-options/#media-and-public-folders). Well, it’s [documented](https://decapcms.org/docs/collection-folder/#media-and-public-folder), but that’s probably not what you want.
|
|
259
241
|
|
|
260
242
|
Rather, if you’d like to add all the media files for a collection in one single folder, specify both `media_folder` and `public_folder` instead of leaving them empty. The trick is to use an _absolute path_ for `media_folder` like the example below. You can try this with Netlify/Decap CMS first if you prefer.
|
|
261
243
|
|
|
@@ -278,7 +260,7 @@ In Sveltia CMS, those per-collection media folders are displayed prominently for
|
|
|
278
260
|
|
|
279
261
|
Sveltia CMS comes with a handy DeepL integration so that you can translate any text field from another locale without leaving the content editor. To enable the high-quality, quick translation feature:
|
|
280
262
|
|
|
281
|
-
1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/
|
|
263
|
+
1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
|
|
282
264
|
1. Sign up for [DeepL API](https://www.deepl.com/pro-api/) and copy your Authentication Key from DeepL’s Account page.
|
|
283
265
|
1. Go back to Sveltia CMS, click on the Account button in the top right corner, then click Settings.
|
|
284
266
|
1. Paste your key to the DeepL API Authentication Key field, and close the Settings dialog.
|
|
@@ -456,7 +438,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
456
438
|
[^14]: [Netlify/Decap CMS #4635](https://github.com/decaporg/decap-cms/issues/4635), [#4738](https://github.com/decaporg/decap-cms/issues/4738), [#5920](https://github.com/decaporg/decap-cms/issues/5920), [#6410](https://github.com/decaporg/decap-cms/issues/6410)
|
|
457
439
|
[^15]: [Netlify/Decap CMS #6932](https://github.com/decaporg/decap-cms/issues/6932)
|
|
458
440
|
[^16]: [Netlify/Decap CMS #2103](https://github.com/decaporg/decap-cms/issues/2103)
|
|
459
|
-
[^17]: [Netlify/Decap CMS #1333](https://github.com/decaporg/decap-cms/issues/1333)
|
|
441
|
+
[^17]: [Netlify/Decap CMS #1333](https://github.com/decaporg/decap-cms/issues/1333), [#7077](https://github.com/decaporg/decap-cms/issues/7077)
|
|
460
442
|
[^18]: [Netlify/Decap CMS #441](https://github.com/decaporg/decap-cms/issues/441)
|
|
461
443
|
[^19]: [Netlify/Decap CMS #5910](https://github.com/decaporg/decap-cms/issues/5910)
|
|
462
444
|
[^20]: [Netlify/Decap CMS #4563](https://github.com/decaporg/decap-cms/issues/4563)
|
|
@@ -465,3 +447,8 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
465
447
|
[^23]: [Netlify/Decap CMS #2](https://github.com/decaporg/decap-cms/issues/2)
|
|
466
448
|
[^24]: [Netlify/Decap CMS #6831](https://github.com/decaporg/decap-cms/issues/6831)
|
|
467
449
|
[^25]: [Netlify/Decap CMS #6987](https://github.com/decaporg/decap-cms/issues/6987)
|
|
450
|
+
[^26]: [Netlify/Decap CMS #3285](https://github.com/decaporg/decap-cms/issues/3285)
|
|
451
|
+
[^27]: [Netlify/Decap CMS #3285](https://github.com/decaporg/decap-cms/issues/5617)
|
|
452
|
+
[^28]: [Netlify/Decap CMS #6836](https://github.com/decaporg/decap-cms/pull/6836)
|
|
453
|
+
[^29]: [Netlify/Decap CMS #4783](https://github.com/decaporg/decap-cms/pull/4783)
|
|
454
|
+
[^30]: [Netlify/Decap CMS #565](https://github.com/decaporg/decap-cms/pull/565)
|