@sveltia/cms 0.29.0 → 0.29.1
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 +28 -7
- package/dist/sveltia-cms.js +34 -34
- package/dist/sveltia-cms.mjs +23 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Our goal is to make it a viable successor to Netlify CMS, expand the Git-based h
|
|
|
27
27
|
While we are fixing reported bugs as fast as we can, usually within 24 hours, 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
28
|
|
|
29
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
|
|
30
|
+
- Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible (so far 90+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 100 by GA)
|
|
31
31
|
- Responding to user feedback
|
|
32
32
|
- Implementing our own enhancement ideas
|
|
33
33
|
|
|
@@ -109,6 +109,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
109
109
|
|
|
110
110
|
- Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect top-notch i18n support, as it’s required by clients of maintainer [@kyoshino](https://github.com/kyoshino), who himself was a long-time Japanese localizer for Mozilla and currently lives in a [city](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
|
|
111
111
|
- You can easily switch between locales while editing with just a click on a button instead of a dropdown list.
|
|
112
|
+
- Language labels appear in human-readable display names instead of ISO 639 language codes, which not everyone is familiar with. For example, it might be difficult to recognize `DE` as German or `NL` as Dutch.
|
|
112
113
|
- Fields in non-default locales are validated as expected[^13].
|
|
113
114
|
- Boolean, DateTime, List and Number fields in the entry preview are displayed in a localized format.
|
|
114
115
|
- [Integrates DeepL](#using-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
@@ -118,11 +119,11 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
118
119
|
- Raises a validation error instead of failing silently if the `single_file` structure is used and a required field is not filled in any of the locales[^55].
|
|
119
120
|
- [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].
|
|
120
121
|
- Boolean fields are updated in real time between locales like other widgets to avoid confusion[^35].
|
|
121
|
-
- Relation fields with i18n enabled won’t trigger a change in content draft status when you start editing an existing entry[^84].
|
|
122
|
+
- Relation fields with i18n enabled won’t trigger a change in the content draft status when you start editing an existing entry[^84].
|
|
122
123
|
- 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].
|
|
123
124
|
- You can use the `{{locale}}` template tag in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language[^63].
|
|
124
125
|
- You can [localize entry slugs](#localizing-entry-slugs) while linking the localized files[^80], thanks to the support for Hugo’s `translationKey`[^81].
|
|
125
|
-
- Supports multiple files/folders i18n structure for file collections[^87]. To enable
|
|
126
|
+
- Supports multiple files/folders i18n structure for file collections[^87]. To enable it, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/about.{{locale}}.json` or `content/pages/{{locale}}/about.json`. The global `structure` option only applies to folder collections as before.
|
|
126
127
|
|
|
127
128
|
### Better collections
|
|
128
129
|
|
|
@@ -135,6 +136,9 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
135
136
|
- Single quotes in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
136
137
|
- You can use nested fields (dot notation) in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`[^62].
|
|
137
138
|
- You can use Markdown in collection descriptions[^79]. Bold, italic, strikethrough, code and links are allowed.
|
|
139
|
+
- The New Entry button won’t appear when a developer accidentally sets the `create: true` option on a file collection because it’s useless[^89].
|
|
140
|
+
- The Delete Entry button won’t appear when a developer accidentally sets the `delete: true` option on a file collection because these preset files should not be deleted.
|
|
141
|
+
- A folder collection filter with a boolean value works as expected[^93].
|
|
138
142
|
|
|
139
143
|
### Better content editing
|
|
140
144
|
|
|
@@ -143,12 +147,14 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
143
147
|
- You can hide the preview of a specific field with `preview: false`.
|
|
144
148
|
- Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
|
|
145
149
|
- 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].
|
|
150
|
+
- The Preview pane displays the titles of all fields, making it easier to see which fields are filled in.
|
|
151
|
+
- Provides better scroll synchronization between the panes when editing or previewing an entry[^92].
|
|
146
152
|
- You can use a full regular expression, including flags, for the widget `pattern` option[^82]. For example, if you want to allow 280 characters or less in a multiline text field, you could write `/^.{0,280}$/s` (but you can now use the `maxlength` option instead).
|
|
147
153
|
- A long validation error message is displayed in full, without being hidden behind the field label[^59].
|
|
148
154
|
|
|
149
155
|
### Better data output
|
|
150
156
|
|
|
151
|
-
- Keys in generated JSON/TOML/YAML content are always sorted
|
|
157
|
+
- Keys in generated JSON/TOML/YAML content are always sorted by the order of configured fields, making Git commits clean and consistent[^86].
|
|
152
158
|
- 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.
|
|
153
159
|
- Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
|
|
154
160
|
- 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][^69].
|
|
@@ -159,6 +165,8 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
159
165
|
- Boolean
|
|
160
166
|
- A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error[^45].
|
|
161
167
|
- An optional Boolean field with no default value is also saved as `false` by default, rather than nothing[^46].
|
|
168
|
+
- DateTime
|
|
169
|
+
- A DateTime field doesn’t trigger a change in the content draft status when you’ve just started editing a new entry[^90].
|
|
162
170
|
- Hidden
|
|
163
171
|
- The `default` value is saved when you create a file collection item, not just a folder collection item[^78].
|
|
164
172
|
- List
|
|
@@ -169,18 +177,23 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
169
177
|
- Markdown
|
|
170
178
|
- The rich text editor is built with [Lexical](https://github.com/facebook/lexical) instead of [Slate](https://github.com/ianstormtaylor/slate), which solves various problems found in Netlify/Decap CMS, including fatal application crashes[^53][^70][^71][^72][^73].
|
|
171
179
|
- You can set the default editor mode by changing the order of the `modes` option[^58]. If you want to use the plain text editor by default, add `modes: [raw, rich_text]` to the field configuration.
|
|
180
|
+
- Line breaks are rendered as line breaks in the Preview pane according to GitHub Flavored Markdown.
|
|
172
181
|
- Object
|
|
173
182
|
- Sveltia CMS offers two ways to have conditional fields in a collection[^30]:
|
|
174
183
|
- You can use [variable types](https://decapcms.org/docs/variable-type-widgets/) (the `types` option) with the Object widget just like the List widget.
|
|
175
|
-
- An optional Object field (`required: false`) can be manually added or removed with a checkbox. If unadded or removed, the required subfields won’t trigger validation errors[^16].
|
|
184
|
+
- An optional Object field (`required: false`) can be manually added or removed with a checkbox[^88]. If unadded or removed, the required subfields won’t trigger validation errors[^16].
|
|
176
185
|
- Relation
|
|
177
186
|
- Field options are displayed with no additional API requests[^14]. The confusing `options_length` option, which defaults to 20, is therefore ignored[^76].
|
|
187
|
+
- `slug` can be used for `value_field` to show all available options instead of just one in some situations[^91].
|
|
188
|
+
- `display_fields` is displayed in the Preview page instead of `value_field`.
|
|
178
189
|
- The redundant `search_fields` option is not required in Sveltia CMS, as it defaults to `display_fields` (and `value_field`).
|
|
179
190
|
- Select
|
|
180
191
|
- It’s possible to select an option with value `0`[^56].
|
|
192
|
+
- `label` is displayed in the Preview page instead of `value`.
|
|
181
193
|
- String
|
|
182
194
|
- When a YouTube video URL is entered in a String field, it appears as an embedded video in the preview pane.
|
|
183
195
|
- Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
196
|
+
- When a regular URL is entered in a String field, it appears as a link that can be opened in a new browser tab.
|
|
184
197
|
- Supports the `type` option that accepts `url` or `email` as a value, which will validate the value as a URL or email.
|
|
185
198
|
- Supports the `prefix` and `suffix` string options, which automatically prepend and/or append the developer-defined value to the user-input value.
|
|
186
199
|
- Boolean, Number and String
|
|
@@ -191,6 +204,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
191
204
|
- A new asset can be uploaded by dragging & dropping it into the dialog[^20].
|
|
192
205
|
- A URL can also be entered in the dialog.
|
|
193
206
|
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More services will be added later.
|
|
207
|
+
- 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.
|
|
194
208
|
- List and Object
|
|
195
209
|
- The `summary` is displayed correctly when it refers to a Relation field[^36].
|
|
196
210
|
- Markdown, String and Text
|
|
@@ -230,6 +244,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
230
244
|
- 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].
|
|
231
245
|
- 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].
|
|
232
246
|
- Hidden files (dot files) don’t appear in the Asset Library[^47].
|
|
247
|
+
- You can add assets using the Quick Add button in the upper right corner of the application.
|
|
233
248
|
|
|
234
249
|
## Compatibility
|
|
235
250
|
|
|
@@ -752,7 +767,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
752
767
|
[^50]: Netlify/Decap CMS [#4646](https://github.com/decaporg/decap-cms/issues/4646), [#7167](https://github.com/decaporg/decap-cms/issues/7167)
|
|
753
768
|
[^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)
|
|
754
769
|
[^52]: Netlify/Decap CMS [#7147](https://github.com/decaporg/decap-cms/issues/7147)
|
|
755
|
-
[^53]: Netlify/Decap CMS [#5673](https://github.com/decaporg/decap-cms/issues/5673), [#6707](https://github.com/decaporg/decap-cms/issues/6707)
|
|
770
|
+
[^53]: Netlify/Decap CMS [#512](https://github.com/decaporg/decap-cms/issues/512), [#5673](https://github.com/decaporg/decap-cms/issues/5673), [#6707](https://github.com/decaporg/decap-cms/issues/6707)
|
|
756
771
|
[^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.
|
|
757
772
|
[^55]: Netlify/Decap CMS [#4480](https://github.com/decaporg/decap-cms/issues/4480), [#6353](https://github.com/decaporg/decap-cms/issues/6353)
|
|
758
773
|
[^56]: Netlify/Decap CMS [#6515](https://github.com/decaporg/decap-cms/issues/6515)
|
|
@@ -777,7 +792,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
777
792
|
[^75]: Netlify/Decap CMS [#5472](https://github.com/decaporg/decap-cms/issues/5472)
|
|
778
793
|
[^76]: Netlify/Decap CMS [#4738](https://github.com/decaporg/decap-cms/issues/4738)
|
|
779
794
|
[^77]: Netlify/Decap CMS [#6565](https://github.com/decaporg/decap-cms/issues/6565)
|
|
780
|
-
[^78]: Netlify/Decap CMS [#3046](https://github.com/decaporg/decap-cms/issues/3046), [#4363](https://github.com/decaporg/decap-cms/issues/4363)
|
|
795
|
+
[^78]: Netlify/Decap CMS [#2294](https://github.com/decaporg/decap-cms/issues/2294), [#3046](https://github.com/decaporg/decap-cms/issues/3046), [#4363](https://github.com/decaporg/decap-cms/issues/4363)
|
|
781
796
|
[^79]: Netlify/Decap CMS [#5726](https://github.com/decaporg/decap-cms/issues/5726)
|
|
782
797
|
[^80]: Netlify/Decap CMS [#5493](https://github.com/decaporg/decap-cms/issues/5493), [#6600](https://github.com/decaporg/decap-cms/issues/6600)
|
|
783
798
|
[^81]: Netlify/Decap CMS [#4645](https://github.com/decaporg/decap-cms/issues/4645)
|
|
@@ -787,4 +802,10 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
787
802
|
[^85]: Netlify/Decap CMS [#5055](https://github.com/decaporg/decap-cms/issues/5055), [#5470](https://github.com/decaporg/decap-cms/issues/5470), [#6989](https://github.com/decaporg/decap-cms/issues/6989)
|
|
788
803
|
[^86]: Netlify/Decap CMS [#6759](https://github.com/decaporg/decap-cms/issues/6759), [#6901](https://github.com/decaporg/decap-cms/issues/6901)
|
|
789
804
|
[^87]: Netlify/Decap CMS [#5280](https://github.com/decaporg/decap-cms/issues/5280)
|
|
805
|
+
[^88]: Netlify/Decap CMS [#1267](https://github.com/decaporg/decap-cms/issues/1267)
|
|
806
|
+
[^89]: Netlify/Decap CMS [#4255](https://github.com/decaporg/decap-cms/issues/4255)
|
|
807
|
+
[^90]: Netlify/Decap CMS [#725](https://github.com/decaporg/decap-cms/issues/725)
|
|
808
|
+
[^91]: Netlify/Decap CMS [#4954](https://github.com/decaporg/decap-cms/issues/4954)
|
|
809
|
+
[^92]: Netlify/Decap CMS [#1466](https://github.com/decaporg/decap-cms/issues/1466)
|
|
810
|
+
[^93]: Netlify/Decap CMS [#1000](https://github.com/decaporg/decap-cms/issues/1000)
|
|
790
811
|
[^100]: 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) — 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).
|