@sveltia/cms 0.40.0 → 0.40.2
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 +58 -51
- package/dist/sveltia-cms.js +178 -180
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +229 -231
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,18 +36,15 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
36
36
|
- [Compatibility](#compatibility)
|
|
37
37
|
- [Features not to be implemented](#features-not-to-be-implemented)
|
|
38
38
|
- [Current limitations](#current-limitations)
|
|
39
|
-
- [Roadmap](#roadmap)
|
|
40
|
-
- [Before the 1.0 release](#before-the-10-release)
|
|
41
|
-
- [After the 1.0 release](#after-the-10-release)
|
|
42
39
|
- [Getting started](#getting-started)
|
|
43
40
|
- [New users](#new-users)
|
|
44
41
|
- [Migration](#migration)
|
|
42
|
+
- [Migrating from Git Gateway backend](#migrating-from-git-gateway-backend)
|
|
43
|
+
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
45
44
|
- [Installing with npm](#installing-with-npm)
|
|
46
45
|
- [Updates](#updates)
|
|
47
46
|
- [Tips \& tricks](#tips--tricks)
|
|
48
47
|
- [Providing a JSON configuration file](#providing-a-json-configuration-file)
|
|
49
|
-
- [Migrating from Git Gateway backend](#migrating-from-git-gateway-backend)
|
|
50
|
-
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
51
48
|
- [Working around authentication error](#working-around-authentication-error)
|
|
52
49
|
- [Working with a local Git repository](#working-with-a-local-git-repository)
|
|
53
50
|
- [Enabling local development in Brave](#enabling-local-development-in-brave)
|
|
@@ -63,6 +60,9 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
63
60
|
- [Setting up Content Security Policy](#setting-up-content-security-policy)
|
|
64
61
|
- [Support \& feedback](#support--feedback)
|
|
65
62
|
- [Contributions](#contributions)
|
|
63
|
+
- [Roadmap](#roadmap)
|
|
64
|
+
- [Before the 1.0 release](#before-the-10-release)
|
|
65
|
+
- [After the 1.0 release](#after-the-10-release)
|
|
66
66
|
- [Related links](#related-links)
|
|
67
67
|
- [As seen on](#as-seen-on)
|
|
68
68
|
- [Disclaimer](#disclaimer)
|
|
@@ -103,6 +103,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
103
103
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
104
104
|
- So far, 120+ of them (or 215+ including duplicates) have been effectively solved in Sveltia CMS
|
|
105
105
|
- Target: 150 issues by GA, 250 (or all the relevant and fixable issues) in a future release
|
|
106
|
+
- Note: issues include both feature requests and bug reports
|
|
106
107
|
- [Let us know](https://github.com/sveltia/sveltia-cms/issues/new) if you have any specific issues you’d like to see solved!
|
|
107
108
|
- Responding to feedback from clients and regular users
|
|
108
109
|
- Implementing our own enhancement ideas for every part of the product
|
|
@@ -118,13 +119,13 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
118
119
|
### Better UX
|
|
119
120
|
|
|
120
121
|
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
|
|
122
|
+
- The maintainer tries to be as responsive as possible. Reported bugs are usually fixed within 24 hours.
|
|
121
123
|
- Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
|
|
122
124
|
- Comes with touch device support, such as larger buttons for easier tapping. While the UI is not yet optimized for small screens, it should work well with large tablets like iPad Pro or Pixel Tablet. Mobile support and other optimizations such as swipe navigation are planned after the 1.0 release.
|
|
123
125
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common fatal application crashes[^113][^129]. Best of all, Svelte offers unmatched performance!
|
|
124
126
|
- The Help menu provides all links to useful resources, including release notes, feedback and support.
|
|
125
127
|
- Users can customize the application with various settings.
|
|
126
128
|
- 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].
|
|
127
|
-
- The screenshots above are worth a thousand words, but read on to learn about many other improvements in detail.
|
|
128
129
|
|
|
129
130
|
### Better performance
|
|
130
131
|
|
|
@@ -134,8 +135,8 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
134
135
|
- Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
|
|
135
136
|
- 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][^65]. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
|
|
136
137
|
- 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/).
|
|
137
|
-
- Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
|
|
138
138
|
- Sorting, filtering and grouping of entries is done instantly without reloading the entire content.
|
|
139
|
+
- Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
|
|
139
140
|
- Thumbnails of assets, including videos and PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
|
|
140
141
|
- No typing lag on input widgets, especially within nested lists and objects[^77].
|
|
141
142
|
|
|
@@ -149,6 +150,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
149
150
|
- A local backup of an entry draft is automatically created without interruption by a confirmation dialog, which annoys users and can cause a page navigation problem if dismissed[^106]. The backup can then be reliably restored without unexpected overwriting[^85].
|
|
150
151
|
- Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
|
|
151
152
|
- The editor closes automatically when an entry is saved. This behaviour can be changed in Settings.
|
|
153
|
+
- Uploading files can be done with drag and drop[^20].
|
|
152
154
|
- You can upload multiple assets at once[^5].
|
|
153
155
|
- You can delete multiple entries and assets at once.
|
|
154
156
|
- Some [keyboard shortcuts](#using-keyboard-shortcuts) are available for faster editing.
|
|
@@ -161,7 +163,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
161
163
|
- Ensures sufficient contrast between the foreground text and background colours.
|
|
162
164
|
- Enabled and disabled buttons can be clearly distinguished[^105].
|
|
163
165
|
- Links are underlined by default to make them easier to recognize. This behaviour can be changed in the Accessibility Settings if you prefer.
|
|
164
|
-
- 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.
|
|
166
|
+
- 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. Support for [high contrast mode](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast) will be added later.
|
|
165
167
|
- Browser console logs for developers are readable in either light or dark mode[^116].
|
|
166
168
|
- We’ll continue to test and improve the application to meet [WCAG 2.2](https://w3c.github.io/wcag/guidelines/22/).
|
|
167
169
|
|
|
@@ -344,7 +346,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
344
346
|
|
|
345
347
|
### Better asset management
|
|
346
348
|
|
|
347
|
-
- 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].
|
|
349
|
+
- A completely new, full-fledged Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents[^96].
|
|
348
350
|
- Navigate between the global media folder and per-collection media folders[^6].
|
|
349
351
|
- Preview image, audio, video, text and PDF files. Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
350
352
|
- Copy the public URL[^74], file path, text data or image data of a selected asset to clipboard. The file path starts with `/` as expected[^48].
|
|
@@ -365,11 +367,13 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
365
367
|
|
|
366
368
|
## Compatibility
|
|
367
369
|
|
|
368
|
-
We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern
|
|
370
|
+
We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern alternative. It’s 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](#migration).
|
|
371
|
+
|
|
372
|
+
However, some features are still missing or will not be added due to deprecation and other factors. Look at the compatibility info below to see if you can migrate now or soon.
|
|
369
373
|
|
|
370
374
|
### Features not to be implemented
|
|
371
375
|
|
|
372
|
-
- **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** for performance reasons. We may implement a high-performance Git Gateway alternative in the future. We may also support the other
|
|
376
|
+
- **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** for performance reasons. We may implement a high-performance Git Gateway alternative in the future. We may also support the other platforms if/when their APIs improve to allow the CMS to fetch multiple files at once.
|
|
373
377
|
- **The Netlify Identity widget will not be supported**, as it’s not useful without Git Gateway. We may be able to support it in the future if/when a Git Gateway alternative is created.
|
|
374
378
|
- The deprecated client-side implicit grant for the GitLab backend will not be supported, as it has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
|
|
375
379
|
- The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
|
|
@@ -400,32 +404,7 @@ These limitations are expected to be resolved before or shortly after GA:
|
|
|
400
404
|
| Map | Not yet supported. |
|
|
401
405
|
| Markdown | Editor components, including built-in `image` and `code-block` as well as custom components, are not yet supported. |
|
|
402
406
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
## Roadmap
|
|
406
|
-
|
|
407
|
-
### Before the 1.0 release
|
|
408
|
-
|
|
409
|
-
- [Svelte 5](https://svelte.dev/blog/svelte-5-release-candidate) _runes_ migration
|
|
410
|
-
- Enhanced [compatibility with Netlify/Decap CMS](#compatibility)
|
|
411
|
-
- Certain compatibility with Static CMS, a now-discontinued community fork of Netlify CMS, specifically the [KeyValue widget](https://staticjscms.netlify.app/docs/widget-keyvalue)[^123]
|
|
412
|
-
- Localization with the new [Fluent](https://projectfluent.org)-powered sveltia-i18n library
|
|
413
|
-
- Accessibility audit
|
|
414
|
-
- Developer documentation (implementation guide)
|
|
415
|
-
- Marketing site
|
|
416
|
-
- Live demo site
|
|
417
|
-
- Official starter templates for the most popular frameworks, including SvelteKit and Next.js
|
|
418
|
-
- Broad automation test coverage (Vitest + Playwright)
|
|
419
|
-
|
|
420
|
-
### After the 1.0 release
|
|
421
|
-
|
|
422
|
-
- Tackling more Netlify/Decap CMS issues, especially the [top voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc), including MDX support[^122], manual entry sorting[^125], roles[^23], mobile optimization[^18] and config editor[^10] — Some features are already implemented in Sveltia CMS
|
|
423
|
-
- Advanced digital asset management (DAM) features, including image editing and tagging[^114]
|
|
424
|
-
- AI integrations for image generation and content writing
|
|
425
|
-
- End-user documentation
|
|
426
|
-
- Contributor documentation
|
|
427
|
-
- Marketplace for custom widgets, etc.
|
|
428
|
-
- and so much more!
|
|
407
|
+
Found a compatibility issue or other missing feature? Let us know by [filing an issue](https://github.com/sveltia/sveltia-cms/issues/new).
|
|
429
408
|
|
|
430
409
|
## Getting started
|
|
431
410
|
|
|
@@ -470,6 +449,20 @@ That’s it! You can open `https://[hostname]/admin/` as before to start editing
|
|
|
470
449
|
|
|
471
450
|
That said, we strongly recommend testing your new Sveltia CMS instance first on your local machine. [See below](#working-with-a-local-git-repository) for how.
|
|
472
451
|
|
|
452
|
+
#### Migrating from Git Gateway backend
|
|
453
|
+
|
|
454
|
+
Sveltia CMS does not support the Git Gateway backend due to performance limitations. If you don’t care about user management with Netlify Identity, you can use the [GitHub backend](https://decapcms.org/docs/github-backend/) or [GitLab backend](https://decapcms.org/docs/gitlab-backend/) instead. Make sure **you install an OAuth client** on GitHub or GitLab in addition to updating your configuration file. As noted in the document, Netlify is still able to facilitate the auth flow.
|
|
455
|
+
|
|
456
|
+
Once you have migrated from the Git Gateway and Netlify Identity combo, you can remove the Netlify Identity widget script tag from your HTML:
|
|
457
|
+
|
|
458
|
+
```diff
|
|
459
|
+
-<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
#### Moving your site from Netlify to another hosting service
|
|
463
|
+
|
|
464
|
+
You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](https://pages.cloudflare.com/) or [GitHub Pages](https://pages.github.com/). But moving away from Netlify means you can no longer sign in with GitHub or GitLab via Netlify. Instead, you can use [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth), which can be easily deployed to Cloudflare Workers, or [any other 3rd party client](https://decapcms.org/docs/external-oauth-clients/) made for Netlify/Decap CMS.
|
|
465
|
+
|
|
473
466
|
### Installing with npm
|
|
474
467
|
|
|
475
468
|
For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS.
|
|
@@ -492,20 +485,6 @@ Sveltia CMS supports a configuration file written in the JSON format in addition
|
|
|
492
485
|
|
|
493
486
|
Alternatively, you can [manually initialize](https://decapcms.org/docs/manual-initialization/) the CMS with a JavaScript configuration object.
|
|
494
487
|
|
|
495
|
-
### Migrating from Git Gateway backend
|
|
496
|
-
|
|
497
|
-
Sveltia CMS does not support the Git Gateway backend due to performance limitations. If you don’t care about user management with Netlify Identity, you can use the [GitHub backend](https://decapcms.org/docs/github-backend/) or [GitLab backend](https://decapcms.org/docs/gitlab-backend/) instead. Make sure **you install an OAuth client** on GitHub or GitLab in addition to updating your configuration file. As noted in the document, Netlify is still able to facilitate the auth flow.
|
|
498
|
-
|
|
499
|
-
Once you have migrated from the Git Gateway and Netlify Identity combo, you can remove the Netlify Identity widget script tag from your HTML:
|
|
500
|
-
|
|
501
|
-
```diff
|
|
502
|
-
-<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
### Moving your site from Netlify to another hosting service
|
|
506
|
-
|
|
507
|
-
You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](https://pages.cloudflare.com/) or [GitHub Pages](https://pages.github.com/). But moving away from Netlify means you can no longer sign in with GitHub or GitLab via Netlify. Instead, you can use [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth), which can be easily deployed to Cloudflare Workers, or [any other 3rd party client](https://decapcms.org/docs/external-oauth-clients/) made for Netlify/Decap CMS.
|
|
508
|
-
|
|
509
488
|
### Working around authentication error
|
|
510
489
|
|
|
511
490
|
If you get an “Authentication Aborted” error when trying to sign in to GitHub or GitLab using the authorization code flow, you may need to check your site’s [`Cross-Origin-Opener-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy). The COOP header is not widely used, but it’s known to break the OAuth flow with a popup window. If that’s your case, changing `same-origin` to `same-origin-allow-popups` solves the problem. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/131))
|
|
@@ -514,12 +493,15 @@ If you get an “Authentication Aborted” error when trying to sign in to GitHu
|
|
|
514
493
|
|
|
515
494
|
You can use Sveltia CMS with a local Git repository like Netlify/Decap CMS, but Sveltia CMS has simplified the workflow by removing the need for additional configuration (the `local_backend` property) and a 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).
|
|
516
495
|
|
|
496
|
+
Basically there are only two differences: you don’t need to run the proxy server, and you need to select your project folder in the browser instead. Here are the detailed steps:
|
|
497
|
+
|
|
517
498
|
1. Make sure you have configured the [GitHub](https://decapcms.org/docs/github-backend/) or [GitLab](https://decapcms.org/docs/gitlab-backend/) backend.
|
|
518
499
|
- Please note that the Git Gateway backend mentioned in the Netlify/Decap CMS [local Git repository document](https://decapcms.org/docs/working-with-a-local-git-repository/) is not supported in Sveltia CMS, so `name: git-gateway` won’t work. You’ll need either `name: github` or `name: gitlab` along with the `repo` definition. If you haven’t determined your repository name yet, just use a random one.
|
|
519
500
|
- You can remove `local_backend` from your configuration, as it will be ignored by Sveltia CMS.
|
|
520
501
|
1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
|
|
521
502
|
1. Visit `http://localhost:[port]/admin/index.html` with Chrome or Edge. The port number varies by framework.
|
|
522
503
|
- Other Chromium-based browsers may also work. Brave user? [See below](#enabling-local-development-in-brave).
|
|
504
|
+
- The `127.0.0.1` address can also be used instead of `localhost`.
|
|
523
505
|
1. Click “Work with Local Repository” and select the project’s root directory once prompted.
|
|
524
506
|
- If you get an error saying “not a repository root directory”, make sure you’ve turned the folder into a repository with either a CUI ([`git init`](https://github.com/git-guides/git-init)) or GUI, and the hidden `.git` folder exists.
|
|
525
507
|
- 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).
|
|
@@ -857,6 +839,31 @@ Looking to build a website with Sveltia CMS? Maintainer [@kyoshino](https://gith
|
|
|
857
839
|
|
|
858
840
|
See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/main/CONTRIBUTING.md).
|
|
859
841
|
|
|
842
|
+
## Roadmap
|
|
843
|
+
|
|
844
|
+
### Before the 1.0 release
|
|
845
|
+
|
|
846
|
+
- [Svelte 5](https://svelte.dev/blog/svelte-5-release-candidate) _runes_ migration
|
|
847
|
+
- Enhanced [compatibility with Netlify/Decap CMS](#compatibility)
|
|
848
|
+
- Certain compatibility with Static CMS, a now-discontinued community fork of Netlify CMS, specifically the [KeyValue widget](https://staticjscms.netlify.app/docs/widget-keyvalue)[^123]
|
|
849
|
+
- Localization with the new [Fluent](https://projectfluent.org)-powered sveltia-i18n library
|
|
850
|
+
- Accessibility audit
|
|
851
|
+
- Developer documentation (implementation guide)
|
|
852
|
+
- Marketing site
|
|
853
|
+
- Live demo site
|
|
854
|
+
- Official starter templates for the most popular frameworks, including SvelteKit and Next.js
|
|
855
|
+
- Broad automation test coverage (Vitest + Playwright)
|
|
856
|
+
|
|
857
|
+
### After the 1.0 release
|
|
858
|
+
|
|
859
|
+
- Tackling more Netlify/Decap CMS issues, especially the [top voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc), including MDX support[^122], manual entry sorting[^125], roles[^23], mobile optimization[^18] and config editor[^10] — Some features are already implemented in Sveltia CMS
|
|
860
|
+
- Advanced digital asset management (DAM) features, including image editing and tagging[^114]
|
|
861
|
+
- AI integrations for image generation and content writing
|
|
862
|
+
- End-user documentation
|
|
863
|
+
- Contributor documentation
|
|
864
|
+
- Marketplace for custom widgets, etc.
|
|
865
|
+
- and so much more!
|
|
866
|
+
|
|
860
867
|
## Related links
|
|
861
868
|
|
|
862
869
|
- Introducing Sveltia CMS: a short technical presentation by [@kyoshino](https://github.com/kyoshino) during the _This Week in Svelte_ online meetup on March 31, 2023 — [recording](https://youtu.be/-YjLubiieYs?t=1660) & [slides](https://docs.google.com/presentation/d/1Wi4ty-1AwOp2-zy7LctmzCV4rrdYPfke9NGhO0DdRdM)
|