@sveltia/cms 0.6.2 → 0.7.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.
Files changed (3) hide show
  1. package/README.md +34 -13
  2. package/dist/sveltia-cms.js +232 -232
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -14,7 +14,9 @@ Sveltia CMS is a Git-based lightweight headless CMS under development as a drop-
14
14
 
15
15
  ## Motivation
16
16
 
17
- Sveltia CMS was born in November 2022, when the development of Netlify CMS had been at a standstill for more than half a year. [@kyoshino](https://github.com/kyoshino)’s clients wanted to replace their Netlify CMS instances mainly to get better internationalization support. Sveltia CMS was built from the ground up to take i18n into account in every corner of the product, while also striving for better UX, performance and productivity. Another goal of the project is to showcase the power of [Svelte](https://svelte.dev/), a modern UI library for creating web applications with less code.
17
+ Sveltia CMS was born in November 2022, when the development of Netlify CMS had been stalled for over six months. [@kyoshino](https://github.com/kyoshino)’s clients were looking to replace their Netlify CMS instances, mainly to get better internationalization (i18n) and multilingual support. Built from the ground up, Sveltia CMS successfully incorporates i18n into every single corner of the product, while striving to radically improve UX, performance and productivity.
18
+
19
+ Our goal is to expand the Git-based headless CMS market to empower small businesses and individuals who don’t need or can’t afford a (No)SQL database to manage their content. The project also showcases the power of [Svelte](https://svelte.dev/), a modern UI library for creating web applications with less code.
18
20
 
19
21
  ## Features
20
22
 
@@ -30,19 +32,21 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
30
32
 
31
33
  - Ready to replace Netlify/Decap CMS _in some casual use case scenarios_ by updating one single line of code.
32
34
  - Existing [configuration files](https://decapcms.org/docs/configuration-options/) can be reused as is.
33
- - Various features are still missing though; [see the compatibility chart below](#compatibility) for details.
35
+ - Various features are still missing though [see the compatibility chart below](#compatibility) for details.
34
36
 
35
37
  ### Better UX
36
38
 
37
- - Offering a modern, intuitive UI, with some inspiration from the Netlify/Decap CMS v3 prototype[^1].
39
+ - Created by an [experienced UX engineer](https://github.com/kyoshino) who loves code and design.
40
+ - Offering a modern, intuitive UI, with some inspiration from the Netlify CMS v3 prototype[^1].
38
41
  - Immersive dark mode[^2].
39
42
  - The screenshots above are worth a thousand words!
40
43
 
41
44
  ### Better performance
42
45
 
43
- - Built completely from scratch with Svelte rather than 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.
44
- - Using the GraphQL API for GitHub by default to fetch contents quickly at once, so showing and searching entries and media are instant. Saving entries and media is also much faster.
45
- - Caching Git files locally to speed up startup and reduce bandwidth.
46
+ - Built completely from scratch with Svelte rather than 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.
47
+ - Using the GraphQL API for GitHub by default to quickly fetch contents at once, so that entries and media can be listed and searched instantly. This avoids the slowness and potential API rate limit violations caused by hundreds of requests with relation widgets[^14].
48
+ - Saving entries and media is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
49
+ - Caching Git files locally to further speed up startup and reduce bandwidth.
46
50
  - Small footprint: less than 300 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).
47
51
 
48
52
  ### Better productivity
@@ -58,8 +62,9 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
58
62
  ### Better i18n support
59
63
 
60
64
  - Making it easier to switch between locales while editing with just a click on a button.
61
- - Fields in non-default locales will be validated as expected[^13]
65
+ - Fields in non-default locales will be validated as expected[^13].
62
66
  - [Integrating DeepL](#use-deepl-to-translate-entry-fields) to allow translating text fields from another locale with one click.
67
+ - You can [disable non-default locale content](#disable-non-default-locale-content)[^15].
63
68
  - 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 writing in non-Latin characters[^12].
64
69
  - Solving limitations in Netlify/Decap CMS’s [list and object widgets](https://decapcms.org/docs/beta-features/#i18n-support) so that changes made with these widgets will be duplicated between locales as expected when using the `i18n: duplicate` field configuration[^7].
65
70
 
@@ -73,7 +78,8 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
73
78
 
74
79
  - Required fields, not optional fields, are clearly marked for efficient data entry.
75
80
  - Integration with Pexels, Pixabay and Unsplash makes it easy to insert free stock photos into image fields[^8].
76
- - You can revert changes for all fields or a specific field/object/list.
81
+ - Optional object fields (`widget:object` with `required:false`) can be manually added or removed. If removed, the required subfields will no longer trigger validation errors[^16].
82
+ - You can revert changes to all fields or a specific field.
77
83
 
78
84
  ### Media library enhancements
79
85
 
@@ -198,10 +204,10 @@ You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](
198
204
 
199
205
  You can use Sveltia CMS with a local Git repository, just like the [beta feature](https://decapcms.org/docs/beta-features/#working-with-a-local-git-repository) in Netlify/Decap CMS, 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).
200
206
 
201
- 1. Launch the local development server for your frontend framework, typically with `npm run dev`.
202
- 1. Visit `http://localhost:[port]/admin/index.html` with Chrome or Edge. The port number depends on your framework.
207
+ 1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
208
+ 1. Visit `http://localhost:[port]/admin/index.html` with Chrome or Edge. The port number varies by framework.
203
209
  1. Click “Work with Local Repository” and select the project’s root directory once prompted.
204
- 1. Make some changes on Sveltia CMS.
210
+ 1. Make some changes to your content on Sveltia CMS.
205
211
  1. See if the produced changes look good using `git diff` or a GUI like [GitHub Desktop](https://desktop.github.com/).
206
212
  1. Commit and push the changes if satisfied, or discard them if you’re just testing.
207
213
 
@@ -252,9 +258,21 @@ Sveltia CMS comes with a handy DeepL integration so that you can translate any t
252
258
  1. Sign up for [DeepL API](https://www.deepl.com/pro-api/) and copy your Authentication Key from DeepL’s Account page.
253
259
  1. Go back to Sveltia CMS, click on the Account button at the top right corner, then click Settings.
254
260
  1. Paste your key to the DeepL API Authentication Key field, and close the Settings dialog.
255
- 1. Open any entry, and you can now translate all fields or individual fields by selecting the Translate menu item.
261
+ 1. Open any entry, and you can now translate all fields or individual fields by selecting Translate from the three-dot menu.
256
262
  1. If you have upgraded to DeepL API Pro, provide your new Authentication Key in the same way.
257
263
 
264
+ ### Disable non-default locale content
265
+
266
+ You can now disable the output of non-default locale content 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 at 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.
267
+
268
+ ```diff
269
+ i18n:
270
+ structure: multiple_files
271
+ locales: [en, fr]
272
+ default_locale: en
273
+ + save_all_locales: false
274
+ ```
275
+
258
276
  ### Use a random ID for an entry slug
259
277
 
260
278
  By default, the [slug for a new entry file](https://decapcms.org/docs/configuration-options/#slug) will be generated based on the entry’s `title` field. Or, you can specify the collection’s `slug` option to use the file creation date or other fields. While the behaviour is generally acceptable and SEO-friendly, it’s not useful if the title might change later or if it contains non-Latin characters like Chinese. In Sveltia CMS, you can easily generate a random [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) for a slug without a custom widget!
@@ -336,7 +354,7 @@ Want to build a website with Sveltia CMS? [@kyoshino](https://github.com/kyoshin
336
354
 
337
355
  ## Contributions
338
356
 
339
- Sveltia CMS is still in early beta, so we do expect various problems. Please [report any bugs to us](https://github.com/sveltia/sveltia-cms/issues/new). Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources.
357
+ Sveltia CMS is still in early beta, so we do expect various problems. Please [report any bugs to us](https://github.com/sveltia/sveltia-cms/issues/new). Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources. As we get closer to the 1.0 release, we’ll be welcoming l10n contributors.
340
358
 
341
359
  ## Related Links
342
360
 
@@ -359,3 +377,6 @@ This software is provided “as is” without any express or implied warranty. T
359
377
  [^11]: [Netlify/Decap CMS #1382](https://github.com/decaporg/decap-cms/issues/1382) and many more. We’ll be updating this list after reviewing their issue list.
360
378
  [^12]: [Netlify/Decap CMS #1975](https://github.com/decaporg/decap-cms/issues/1975)
361
379
  [^13]: [Netlify/Decap CMS #5112](https://github.com/decaporg/decap-cms/issues/5112)
380
+ [^14]: [Netlify/Decap CMS #4635](https://github.com/decaporg/decap-cms/issues/4635), [Netlify/Decap CMS #5920](https://github.com/decaporg/decap-cms/issues/5920), [Netlify/Decap CMS #6410](https://github.com/decaporg/decap-cms/issues/6410)
381
+ [^15]: [Netlify/Decap CMS #6932](https://github.com/decaporg/decap-cms/issues/6932)
382
+ [^16]: [Netlify/Decap CMS #2103](https://github.com/decaporg/decap-cms/issues/2103)