@sveltia/cms 0.19.6 → 0.19.7
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 +49 -31
- package/dist/sveltia-cms.js +156 -156
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Our goal is to make it a viable successor to Netlify CMS, expand the Git-based h
|
|
|
22
22
|
|
|
23
23
|
## Features
|
|
24
24
|
|
|
25
|
-
We are working hard to create a **much better alternative to Netlify CMS** and Decap CMS. Here’s what makes Sveltia CMS different. Look how serious we are!
|
|
25
|
+
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!
|
|
26
26
|
|
|
27
27
|
### Compatible with Netlify/Decap CMS
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
32
32
|
|
|
33
33
|
### Better UX
|
|
34
34
|
|
|
35
|
-
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code and
|
|
35
|
+
- 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
36
|
- Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
|
|
37
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.
|
|
38
38
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management.
|
|
@@ -44,27 +44,30 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
44
44
|
- 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
45
|
- Small footprint: The bundle size is less than 350 KB when minified and gzipped, compared to 1.5 MB of Netlify/Decap CMS. And [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
46
46
|
- 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
|
-
- Saving entries and assets is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
|
|
47
|
+
- 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
48
|
- A list of repository files is cached locally for faster startup and bandwidth savings.
|
|
49
49
|
- Thumbnails of assets, including PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
|
|
50
50
|
- Using caching and lazy loading techniques to improve performance.
|
|
51
51
|
|
|
52
52
|
### Better productivity
|
|
53
53
|
|
|
54
|
-
- You can [work with a local Git repository](#work-with-a-local-git-repository) without
|
|
55
|
-
-
|
|
54
|
+
- You can [work with a local Git repository](#work-with-a-local-git-repository) without any configuration or proxy server[^26].
|
|
55
|
+
- This allows you to bypass the 30 MB file size limit[^51].
|
|
56
|
+
- The `logo_url` defined in the configuration will be used[^49].
|
|
57
|
+
- Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
|
|
56
58
|
- The Entry Editor closes automatically when an entry is saved.
|
|
59
|
+
- You can upload multiple assets at once. (See below)
|
|
57
60
|
- You can delete multiple entries and assets at once.
|
|
58
61
|
- Some keyboard shortcuts are available for faster editing. More to come!
|
|
59
62
|
- Create a new entry: `Ctrl+E` (Windows/Linux) / `Command+E` (macOS)
|
|
60
63
|
- Save an entry: `Ctrl+S` (Windows/Linux) / `Command+S` (macOS)
|
|
61
64
|
- Search for entries and assets: `Ctrl+F` (Windows/Linux) / `Command+F` (macOS)
|
|
62
|
-
-
|
|
65
|
+
- Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available[^31].
|
|
63
66
|
|
|
64
67
|
### Better accessibility
|
|
65
68
|
|
|
66
69
|
- Improved keyboard handling lets you efficiently navigate through UI elements using the Tab, Space, Enter and arrow keys[^17].
|
|
67
|
-
- Comprehensive [WAI-ARIA](https://w3c.github.io/aria/) support
|
|
70
|
+
- Comprehensive [WAI-ARIA](https://w3c.github.io/aria/) support enables users who rely on screen readers such as NVDA and VoiceOver.
|
|
68
71
|
- Ensures sufficient contrast between the foreground text and background colours.
|
|
69
72
|
- Honours your operating system’s [reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) and [reduced transparency](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-transparency) settings.
|
|
70
73
|
- We’ll continue to test and improve the application to meet [WCAG 2.2](https://w3c.github.io/wcag/guidelines/22/).
|
|
@@ -74,16 +77,17 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
74
77
|
- Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases[^34].
|
|
75
78
|
- We have documented how to [set up a Content Security Policy](#set-up-content-security-policy) for the CMS.
|
|
76
79
|
- The `unsafe-eval` or `unsafe-inline` keywords are not needed in the `script-src` CSP directive[^33].
|
|
80
|
+
- The `same-origin` referrer policy is automatically set with a `<meta>` tag.
|
|
77
81
|
|
|
78
82
|
### Better backend support
|
|
79
83
|
|
|
80
|
-
- Uses the GraphQL API where possible for better performance, as mentioned above. You don’t need to set the `use_graphql` option.
|
|
84
|
+
- 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.
|
|
81
85
|
- 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].
|
|
82
86
|
- You can [disable automatic deployments](#disable-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
|
|
83
87
|
|
|
84
88
|
### Better i18n support
|
|
85
89
|
|
|
86
|
-
-
|
|
90
|
+
- You can easily switch between locales while editing with just a click on a button instead of a dropdown list.
|
|
87
91
|
- Fields in non-default locales are validated as expected[^13].
|
|
88
92
|
- [Integrates DeepL](#use-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
89
93
|
- You can [disable non-default locale content](#disable-non-default-locale-content)[^15].
|
|
@@ -95,32 +99,38 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
95
99
|
### Better collections
|
|
96
100
|
|
|
97
101
|
- You can choose a [custom icon for each collection](#use-a-custom-icon-for-a-collection)[^3].
|
|
98
|
-
-
|
|
99
|
-
- String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
|
|
102
|
+
- Assets stored in a [per-collection media folder](#use-a-custom-media-folder-for-a-collection) can be displayed next to the entries.
|
|
100
103
|
- Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
|
|
101
104
|
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
102
105
|
|
|
103
106
|
### Better content editing
|
|
104
107
|
|
|
105
108
|
- Required fields, not optional fields, are clearly marked for efficient data entry.
|
|
106
|
-
- Leading and trailing spaces in text-type field values are automatically removed when you save the entry[^37].
|
|
107
109
|
- You can revert changes to all fields or a specific field.
|
|
108
110
|
- You can hide the preview of a specific field with `preview: false`.
|
|
109
111
|
- Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
|
|
110
112
|
- When you click on a field in the Preview pane, the corresponding field in the Editor pane is highlighted. It will be automatically expanded if collapsed[^41].
|
|
111
113
|
|
|
114
|
+
### Better data output
|
|
115
|
+
|
|
116
|
+
- For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty.
|
|
117
|
+
- Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
|
|
118
|
+
- JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file[^11].
|
|
119
|
+
- String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
|
|
120
|
+
|
|
112
121
|
### Better widgets
|
|
113
122
|
|
|
114
123
|
- Boolean
|
|
115
|
-
- A required field with no default value is saved as `false` by default, without raising a validation error[^45].
|
|
116
|
-
- An optional field with no default value is saved as `false` by default, rather than nothing[^46].
|
|
124
|
+
- A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error[^45].
|
|
125
|
+
- An optional Boolean field with no default value is also saved as `false` by default, rather than nothing[^46].
|
|
117
126
|
- List
|
|
118
|
-
- A required field with no subfield or value is marked as invalid[^43].
|
|
119
|
-
- An optional field with no subfield or value is saved as an empty array[^44].
|
|
127
|
+
- A required List field with no subfield or value is marked as invalid[^43].
|
|
128
|
+
- An optional List field with no subfield or value is saved as an empty array, rather than nothing[^44].
|
|
129
|
+
- You can enter spaces in a simple text-based List field[^50].
|
|
120
130
|
- You can preview variable types without having to register a preview template[^42].
|
|
121
131
|
- Object
|
|
122
132
|
- 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].
|
|
123
|
-
-
|
|
133
|
+
- An optional Object field can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
|
|
124
134
|
- Relation
|
|
125
135
|
- Field options are displayed with no additional API requests[^14]. The `options_length` property is therefore ignored.
|
|
126
136
|
- String
|
|
@@ -132,10 +142,12 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
132
142
|
- The `summary` is displayed correctly when it refers to a Relation field[^36].
|
|
133
143
|
- File and Image
|
|
134
144
|
- Provides a reimagined all-in-one asset selection dialog for File and Image fields.
|
|
135
|
-
- [Collection-specific assets](#use-a-custom-media-folder-for-a-collection)
|
|
136
|
-
-
|
|
145
|
+
- [Collection-specific assets](#use-a-custom-media-folder-for-a-collection) are listed for easy selection, while all assets are displayed in a separate tab[^19].
|
|
146
|
+
- A new asset can be uploaded by dragging & dropping it into the dialog[^20].
|
|
137
147
|
- A URL can also be entered in the dialog.
|
|
138
|
-
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert free stock
|
|
148
|
+
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8].
|
|
149
|
+
- String, Text and Markdown
|
|
150
|
+
- A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
|
|
139
151
|
- New widgets
|
|
140
152
|
- In addition to [generating UUIDs for entry slugs](#use-a-random-id-for-an-entry-slug), Sveltia CMS also supports the proposed `uuid` widget with the following properties[^12]:
|
|
141
153
|
- `prefix`: A string to be prepended to the value. Default: an empty string.
|
|
@@ -147,17 +159,20 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
|
|
|
147
159
|
|
|
148
160
|
- A completely new Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents.
|
|
149
161
|
- Navigate between the global media folder and per-collection media folders[^6].
|
|
150
|
-
- Preview image, audio, video, text and PDF files.
|
|
162
|
+
- Preview image, audio, video, text and PDF files.
|
|
163
|
+
- Check your site’s [CSP](#set-up-content-security-policy) if the preview doesn’t work.
|
|
151
164
|
- Copy the public URL, file path, text data or image data of a selected asset to clipboard.
|
|
165
|
+
- The file path starts with `/` as expected[^48].
|
|
152
166
|
- Edit plaintext assets, including SVG images.
|
|
153
167
|
- Replace existing assets.
|
|
154
168
|
- Download one or more selected assets at once.
|
|
155
169
|
- Delete one or more selected assets at once.
|
|
156
170
|
- Upload multiple assets at once, including files in nested folders, by browsing or dragging and dropping them into the library[^5].
|
|
157
171
|
- Sort or filter assets by name or file type.
|
|
158
|
-
- View asset details, including size, dimensions, and a list of entries that use the selected asset.
|
|
172
|
+
- View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
|
|
159
173
|
- 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].
|
|
160
174
|
- Assets stored in an entry-relative media folder are automatically deleted when the associated entry is deleted because these assets are not available for other entries[^22].
|
|
175
|
+
- Hidden files (dot files) don’t appear in the Asset Library[^47].
|
|
161
176
|
|
|
162
177
|
## Compatibility
|
|
163
178
|
|
|
@@ -166,12 +181,10 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
|
|
|
166
181
|
| Feature | Status in Sveltia CMS |
|
|
167
182
|
| --- | --- |
|
|
168
183
|
| Installation | Installing with `npm` is not supported yet. |
|
|
169
|
-
| Backends | Only the GitHub and GitLab backends are available
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
| Editorial Workflow | Not supported yet. |
|
|
174
|
-
| Open Authoring | Not supported yet. |
|
|
184
|
+
| 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. Git Gateway will not be supported for the same reason; we may implement a performant alternative sometime later. |
|
|
185
|
+
| UI Locales | Only English and Japanese are available at this time. |
|
|
186
|
+
| Media Libraries | External media storage services are not supported yet. We will add support for Cloudinary and Uploadcare soon. We will not support deprecated Netlify Large Media. |
|
|
187
|
+
| Workflow | Editorial Workflow and Open Authoring are not supported yet. |
|
|
175
188
|
| Collections | Nested collections are not supported yet. |
|
|
176
189
|
| Widgets | Custom widgets are not supported yet. [See below](#widget-limitations) for other limitations. |
|
|
177
190
|
| Customizations | Custom previews, custom formatters, manual initialization and event subscriptions are not supported yet. |
|
|
@@ -181,7 +194,7 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
|
|
|
181
194
|
| Widget | Status in Sveltia CMS |
|
|
182
195
|
| --- | --- |
|
|
183
196
|
| Code | Not supported yet. |
|
|
184
|
-
| Date | Sveltia CMS has dropped the support for
|
|
197
|
+
| Date | Sveltia CMS has dropped the support for the deprecated widget following Decap CMS 3.0. Use the DateTime widget instead. |
|
|
185
198
|
| 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. |
|
|
186
199
|
| 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. |
|
|
187
200
|
| Map | Not supported yet. |
|
|
@@ -502,7 +515,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
502
515
|
[^8]: Netlify/Decap CMS [#2579](https://github.com/decaporg/decap-cms/issues/2579)
|
|
503
516
|
[^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505)
|
|
504
517
|
[^10]: Netlify/Decap CMS [#341](https://github.com/decaporg/decap-cms/issues/341), [#1167](https://github.com/decaporg/decap-cms/issues/1167)
|
|
505
|
-
[^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382), [#
|
|
518
|
+
[^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382), [#6994](https://github.com/decaporg/decap-cms/issues/6994)
|
|
506
519
|
[^12]: Netlify/Decap CMS [#1975](https://github.com/decaporg/decap-cms/issues/1975)
|
|
507
520
|
[^13]: Netlify/Decap CMS [#5112](https://github.com/decaporg/decap-cms/issues/5112), [#5653](https://github.com/decaporg/decap-cms/issues/5653)
|
|
508
521
|
[^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)
|
|
@@ -517,7 +530,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
517
530
|
[^23]: Netlify/Decap CMS [#2](https://github.com/decaporg/decap-cms/issues/2)
|
|
518
531
|
[^24]: Netlify/Decap CMS [#6831](https://github.com/decaporg/decap-cms/issues/6831)
|
|
519
532
|
[^25]: Netlify/Decap CMS [#526](https://github.com/decaporg/decap-cms/issues/526), [#6987](https://github.com/decaporg/decap-cms/issues/6987)
|
|
520
|
-
[^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285)
|
|
533
|
+
[^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285)
|
|
521
534
|
[^27]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/5617)
|
|
522
535
|
[^28]: Netlify/Decap CMS [#6836](https://github.com/decaporg/decap-cms/pull/6836)
|
|
523
536
|
[^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
|
|
@@ -538,3 +551,8 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
538
551
|
[^44]: Netlify/Decap CMS [#2613](https://github.com/decaporg/decap-cms/issues/2613)
|
|
539
552
|
[^45]: Netlify/Decap CMS [#1424](https://github.com/decaporg/decap-cms/issues/1424)
|
|
540
553
|
[^46]: Netlify/Decap CMS [#4726](https://github.com/decaporg/decap-cms/issues/4726)
|
|
554
|
+
[^47]: Netlify/Decap CMS [#2370](https://github.com/decaporg/decap-cms/issues/2370), [#5596](https://github.com/decaporg/decap-cms/issues/5596)
|
|
555
|
+
[^48]: Netlify/Decap CMS [#5569](https://github.com/decaporg/decap-cms/issues/5569)
|
|
556
|
+
[^49]: Netlify/Decap CMS [#5752](https://github.com/decaporg/decap-cms/issues/5752)
|
|
557
|
+
[^50]: Netlify/Decap CMS [#4646](https://github.com/decaporg/decap-cms/issues/4646)
|
|
558
|
+
[^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)
|