@sveltia/cms 0.29.2 → 0.29.3
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 +48 -27
- package/dist/sveltia-cms.js +154 -154
- package/dist/sveltia-cms.mjs +153 -153
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,12 +22,13 @@ Our goal is to make it a viable successor to Netlify CMS, expand the Git-based h
|
|
|
22
22
|
|
|
23
23
|
## Development status
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Sveltia CMS is **still in beta**, so please be careful when trying it out.
|
|
26
26
|
|
|
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
|
|
30
|
+
- Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible
|
|
31
|
+
- So far 95+ of them have been effectively solved in Sveltia CMS, with the goal of solving 125 by GA
|
|
31
32
|
- Responding to user feedback
|
|
32
33
|
- Implementing our own enhancement ideas
|
|
33
34
|
|
|
@@ -39,7 +40,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
39
40
|
|
|
40
41
|
### Compatible with Netlify/Decap CMS
|
|
41
42
|
|
|
42
|
-
- Ready to
|
|
43
|
+
- 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.
|
|
43
44
|
- Your existing [configuration file](https://decapcms.org/docs/configuration-options/) can be reused as is.
|
|
44
45
|
- Various features are still missing though — look at the [compatibility info](#compatibility) below to see if you can migrate now or soon.
|
|
45
46
|
|
|
@@ -73,13 +74,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
73
74
|
- The editor closes automatically when an entry is saved.
|
|
74
75
|
- You can upload multiple assets at once[^5].
|
|
75
76
|
- You can delete multiple entries and assets at once.
|
|
76
|
-
- Some keyboard shortcuts are available for faster editing.
|
|
77
|
-
- View the Content Library: `Alt+1`
|
|
78
|
-
- View the Asset Library: `Alt+2`
|
|
79
|
-
- Search for entries and assets: `Ctrl+F` (Windows/Linux) or `Command+F` (macOS)
|
|
80
|
-
- Create a new entry: `Ctrl+E` (Windows/Linux) or `Command+E` (macOS)
|
|
81
|
-
- Save an entry: `Ctrl+S` (Windows/Linux) or `Command+S` (macOS)
|
|
82
|
-
- Cancel entry editing: `Escape`
|
|
77
|
+
- Some [keyboard shortcuts](#using-keyboard-shortcuts) are available for faster editing.
|
|
83
78
|
- 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].
|
|
84
79
|
|
|
85
80
|
### Better accessibility
|
|
@@ -100,7 +95,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
100
95
|
### Better backend support
|
|
101
96
|
|
|
102
97
|
- 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.
|
|
103
|
-
- 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].
|
|
98
|
+
- 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`[^95][^27].
|
|
104
99
|
- 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].
|
|
105
100
|
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub. Checks are performed frequently and an incident notification is displayed prominently for both services.
|
|
106
101
|
- 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.
|
|
@@ -125,6 +120,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
125
120
|
- 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].
|
|
126
121
|
- 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].
|
|
127
122
|
- You can [localize entry slugs](#localizing-entry-slugs) while linking the localized files[^80], thanks to the support for Hugo’s `translationKey`[^81].
|
|
123
|
+
- The List widget’s `label` and `label_singular` are not converted to lowercase, which is especially problematic in German, where all nouns are capitalized[^98].
|
|
128
124
|
|
|
129
125
|
### Better collections
|
|
130
126
|
|
|
@@ -138,7 +134,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
138
134
|
- You can use nested fields (dot notation) in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`[^62].
|
|
139
135
|
- You can use Markdown in collection descriptions[^79]. Bold, italic, strikethrough, code and links are allowed.
|
|
140
136
|
- 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].
|
|
141
|
-
- The Delete Entry button won’t appear when a developer accidentally sets the `delete: true` option on a file collection because
|
|
137
|
+
- The Delete Entry button won’t appear when a developer accidentally sets the `delete: true` option on a file collection because the preconfigured files should not be deleted.
|
|
142
138
|
- A folder collection filter with a boolean value works as expected[^93].
|
|
143
139
|
|
|
144
140
|
### Better content editing
|
|
@@ -171,6 +167,8 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
171
167
|
- Hidden
|
|
172
168
|
- The `default` value is saved when you create a file collection item, not just a folder collection item[^78].
|
|
173
169
|
- List
|
|
170
|
+
- The Add Item button appears at the bottom of the list when the `add_to_top` option is not `true`, so you don’t have to scroll up each time to add new items.
|
|
171
|
+
- You can expand or collapse the entire list, while the Expand All and Collapse All buttons allow you to expand or collapse all items in the list at once.
|
|
174
172
|
- A required List field with no subfield or value is marked as invalid[^43].
|
|
175
173
|
- An optional List field with no subfield or value is saved as an empty array, rather than nothing[^44].
|
|
176
174
|
- You can enter spaces in a simple text-based List field[^50].
|
|
@@ -187,11 +185,11 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
187
185
|
- Field options are displayed with no additional API requests[^14]. The confusing `options_length` option, which defaults to 20, is therefore ignored[^76].
|
|
188
186
|
- `slug` can be used for `value_field` to show all available options instead of just one in some situations[^91].
|
|
189
187
|
- Template strings with a wildcard like `{{cities.*.name}}` can also be used for `value_field`[^94].
|
|
190
|
-
- `display_fields` is displayed in the Preview
|
|
188
|
+
- `display_fields` is displayed in the Preview pane instead of `value_field`.
|
|
191
189
|
- The redundant `search_fields` option is not required in Sveltia CMS, as it defaults to `display_fields` (and `value_field`).
|
|
192
190
|
- Select
|
|
193
191
|
- It’s possible to select an option with value `0`[^56].
|
|
194
|
-
- `label` is displayed in the Preview
|
|
192
|
+
- `label` is displayed in the Preview pane instead of `value`.
|
|
195
193
|
- String
|
|
196
194
|
- When a YouTube video URL is entered in a String field, it appears as an embedded video in the Preview pane.
|
|
197
195
|
- Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
@@ -229,7 +227,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
229
227
|
|
|
230
228
|
### Better asset management
|
|
231
229
|
|
|
232
|
-
- 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.
|
|
230
|
+
- 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[^96].
|
|
233
231
|
- Navigate between the global media folder and per-collection media folders[^6].
|
|
234
232
|
- Preview image, audio, video, text and PDF files.
|
|
235
233
|
- Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
@@ -247,6 +245,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
247
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].
|
|
248
246
|
- Hidden files (dot files) don’t appear in the Asset Library[^47].
|
|
249
247
|
- You can add assets using the Quick Add button in the upper right corner of the application.
|
|
248
|
+
- Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens[^97].
|
|
250
249
|
|
|
251
250
|
## Compatibility
|
|
252
251
|
|
|
@@ -369,7 +368,7 @@ Depending on your server or framework’s configuration, when you access the CMS
|
|
|
369
368
|
- Rename `/admin/index.html` to `/admin/cms.html`, and access `/admin/cms`
|
|
370
369
|
- [Specify the configuration file path](https://decapcms.org/docs/configuration-options/#configuration-file) with a `<link>` tag in `/admin/index.html`:
|
|
371
370
|
```html
|
|
372
|
-
<link href="/admin/config.yml" type="
|
|
371
|
+
<link href="/admin/config.yml" type="application/yaml" rel="cms-config-url" />
|
|
373
372
|
```
|
|
374
373
|
|
|
375
374
|
### Providing a JSON configuration file
|
|
@@ -409,7 +408,9 @@ You can use Sveltia CMS with a local Git repository like [Netlify/Decap CMS](htt
|
|
|
409
408
|
1. Open the dev site at `http://localhost:[port]/` to check the rendered pages.
|
|
410
409
|
1. Commit and push the changes if satisfied, or discard them if you’re just testing.
|
|
411
410
|
|
|
412
|
-
|
|
411
|
+
Keep in mind that the local repository support doesn’t perform any Git operations. You’ll have to manually fetch, pull, commit and push all changes using a Git client. In the near future, we’ll figure out if there’s a way to do this in a browser (because `netlify-cms-proxy-server` actually has undocumented `git` mode that allows developers to create commits to a local repository).
|
|
412
|
+
|
|
413
|
+
Also, at this point, you have to reload the CMS to see the latest content after retrieving remote updates. This will be unnecessary once browsers support the proposed `FileSystemObserver` API.
|
|
413
414
|
|
|
414
415
|
### Using a custom icon for a collection
|
|
415
416
|
|
|
@@ -466,16 +467,32 @@ Rather, if you’d like to add all the media files for a collection in one singl
|
|
|
466
467
|
|
|
467
468
|
In Sveltia CMS, those per-collection media folders are displayed prominently for easier asset management.
|
|
468
469
|
|
|
470
|
+
### Using keyboard shortcuts
|
|
471
|
+
|
|
472
|
+
- View the Content Library: `Alt+1`
|
|
473
|
+
- View the Asset Library: `Alt+2`
|
|
474
|
+
- Search for entries and assets: `Ctrl+F` (Windows/Linux) or `Command+F` (macOS)
|
|
475
|
+
- Create a new entry: `Ctrl+E` (Windows/Linux) or `Command+E` (macOS)
|
|
476
|
+
- Save an entry: `Ctrl+S` (Windows/Linux) or `Command+S` (macOS)
|
|
477
|
+
- Cancel entry editing: `Escape`
|
|
478
|
+
|
|
469
479
|
### Using DeepL to translate entry fields
|
|
470
480
|
|
|
471
481
|
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:
|
|
472
482
|
|
|
473
483
|
1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
|
|
474
484
|
1. Sign up for [DeepL API](https://www.deepl.com/pro-api/) and copy your Authentication Key from DeepL’s Account page.
|
|
475
|
-
1.
|
|
476
|
-
1.
|
|
477
|
-
1.
|
|
478
|
-
1.
|
|
485
|
+
1. Open an entry in Sveltia CMS.
|
|
486
|
+
1. Click on the Translation button on the header or each field, right next to the 3-dot menu.
|
|
487
|
+
1. Paste your key when prompted.
|
|
488
|
+
1. The field(s) will be automatically translated.
|
|
489
|
+
|
|
490
|
+
If you have upgraded to DeepL API Pro, provide your new Authentication Key:
|
|
491
|
+
|
|
492
|
+
1. Click the Account button in the upper right corner, then click Settings.
|
|
493
|
+
1. Select the Language tab.
|
|
494
|
+
1. Paste your key to the DeepL API Authentication Key field.
|
|
495
|
+
1. Close the Settings dialog.
|
|
479
496
|
|
|
480
497
|
### Localizing entry slugs
|
|
481
498
|
|
|
@@ -694,7 +711,7 @@ img-src 'self' blob: data: https://*;
|
|
|
694
711
|
|
|
695
712
|
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!
|
|
696
713
|
|
|
697
|
-
|
|
714
|
+
Looking to build a website with Sveltia CMS? Maintainer [@kyoshino](https://github.com/kyoshino) is available for hire depending on your requirements. Feel free to reach out!
|
|
698
715
|
|
|
699
716
|
## Contributions
|
|
700
717
|
|
|
@@ -702,7 +719,7 @@ Since Sveltia CMS is still in beta, we expect various problems. Please [report a
|
|
|
702
719
|
|
|
703
720
|
Tips are always welcome! The project hasn’t set up a sponsorship program, but maintainer [@kyoshino](https://github.com/kyoshino) has a [PayPal account](https://paypal.me/kohei).
|
|
704
721
|
|
|
705
|
-
Last but not least, don’t forget to star this project and spread the word so more users can benefit from
|
|
722
|
+
Last but not least, don’t forget to star this project and spread the word so more users can benefit from a better CMS experience!
|
|
706
723
|
|
|
707
724
|
## Related links
|
|
708
725
|
|
|
@@ -725,7 +742,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
725
742
|
[^6]: Netlify/Decap CMS [#3240](https://github.com/decaporg/decap-cms/issues/3240)
|
|
726
743
|
[^7]: Netlify/Decap CMS [#4386](https://github.com/decaporg/decap-cms/issues/4386)
|
|
727
744
|
[^8]: Netlify/Decap CMS [#2579](https://github.com/decaporg/decap-cms/issues/2579)
|
|
728
|
-
[^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505)
|
|
745
|
+
[^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505), [#4211](https://github.com/decaporg/decap-cms/issues/4211)
|
|
729
746
|
[^10]: Netlify/Decap CMS [#341](https://github.com/decaporg/decap-cms/issues/341), [#1167](https://github.com/decaporg/decap-cms/issues/1167)
|
|
730
747
|
[^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382)
|
|
731
748
|
[^12]: Netlify/Decap CMS [#1975](https://github.com/decaporg/decap-cms/issues/1975), [#3712](https://github.com/decaporg/decap-cms/issues/3712)
|
|
@@ -744,7 +761,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
744
761
|
[^25]: Netlify/Decap CMS [#526](https://github.com/decaporg/decap-cms/issues/526), [#6987](https://github.com/decaporg/decap-cms/issues/6987)
|
|
745
762
|
[^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285)
|
|
746
763
|
[^27]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/5617)
|
|
747
|
-
[^28]: Netlify/Decap CMS [#6836](https://github.com/decaporg/decap-cms/pull/6836)
|
|
764
|
+
[^28]: Netlify/Decap CMS [#2677](https://github.com/decaporg/decap-cms/pull/2677), [#6836](https://github.com/decaporg/decap-cms/pull/6836)
|
|
748
765
|
[^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
|
|
749
766
|
[^30]: Netlify/Decap CMS [#565](https://github.com/decaporg/decap-cms/issues/565)
|
|
750
767
|
[^31]: Netlify/Decap CMS [#1045](https://github.com/decaporg/decap-cms/issues/1045)
|
|
@@ -759,7 +776,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
759
776
|
[^40]: Netlify/Decap CMS [#5630](https://github.com/decaporg/decap-cms/issues/5630)
|
|
760
777
|
[^41]: Netlify/Decap CMS [#7011](https://github.com/decaporg/decap-cms/issues/7011)
|
|
761
778
|
[^42]: Netlify/Decap CMS [#2307](https://github.com/decaporg/decap-cms/issues/2307)
|
|
762
|
-
[^43]: Netlify/Decap CMS [#5381](https://github.com/decaporg/decap-cms/issues/5381)
|
|
779
|
+
[^43]: Netlify/Decap CMS [#4387](https://github.com/decaporg/decap-cms/issues/4387), [#5381](https://github.com/decaporg/decap-cms/issues/5381)
|
|
763
780
|
[^44]: Netlify/Decap CMS [#2613](https://github.com/decaporg/decap-cms/issues/2613)
|
|
764
781
|
[^45]: Netlify/Decap CMS [#1424](https://github.com/decaporg/decap-cms/issues/1424)
|
|
765
782
|
[^46]: Netlify/Decap CMS [#4726](https://github.com/decaporg/decap-cms/issues/4726)
|
|
@@ -777,7 +794,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
777
794
|
[^58]: Netlify/Decap CMS [#5125](https://github.com/decaporg/decap-cms/issues/5125)
|
|
778
795
|
[^59]: Netlify/Decap CMS [#1654](https://github.com/decaporg/decap-cms/issues/1654)
|
|
779
796
|
[^60]: Netlify/Decap CMS [#386](https://github.com/decaporg/decap-cms/issues/386)
|
|
780
|
-
[^61]: Netlify/Decap CMS [#1489](https://github.com/decaporg/decap-cms/issues/1489)
|
|
797
|
+
[^61]: Netlify/Decap CMS [#1489](https://github.com/decaporg/decap-cms/issues/1489), [#5838](https://github.com/decaporg/decap-cms/issues/5838)
|
|
781
798
|
[^62]: Netlify/Decap CMS [#7192](https://github.com/decaporg/decap-cms/issues/7192)
|
|
782
799
|
[^63]: Netlify/Decap CMS [#4877](https://github.com/decaporg/decap-cms/issues/4877)
|
|
783
800
|
[^64]: Netlify/Decap CMS [#3853](https://github.com/decaporg/decap-cms/issues/3853)
|
|
@@ -811,4 +828,8 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
811
828
|
[^92]: Netlify/Decap CMS [#1466](https://github.com/decaporg/decap-cms/issues/1466)
|
|
812
829
|
[^93]: Netlify/Decap CMS [#1000](https://github.com/decaporg/decap-cms/issues/1000)
|
|
813
830
|
[^94]: Netlify/Decap CMS [#5487](https://github.com/decaporg/decap-cms/issues/5487)
|
|
831
|
+
[^95]: Netlify/Decap CMS [#4417](https://github.com/decaporg/decap-cms/issues/4417)
|
|
832
|
+
[^96]: Netlify/Decap CMS [#962](https://github.com/decaporg/decap-cms/issues/962)
|
|
833
|
+
[^97]: Netlify/Decap CMS [#4288](https://github.com/decaporg/decap-cms/issues/4288)
|
|
834
|
+
[^98]: Netlify/Decap CMS [#3856](https://github.com/decaporg/decap-cms/issues/3856)
|
|
814
835
|
[^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).
|