@sveltia/cms 0.88.2 → 0.89.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 +23 -17
- package/dist/sveltia-cms.js +249 -247
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +249 -247
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +8 -8
- package/types/public.d.ts +6 -5
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
14
14
|
|
|
15
15
|
<br>
|
|
16
16
|
|
|
17
|
-
<br>
|
|
18
18
|
|
|
19
19
|
## Table of contents
|
|
20
20
|
|
|
@@ -133,7 +133,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
133
133
|
|
|
134
134
|
- Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
|
|
135
135
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
136
|
-
- So far,
|
|
136
|
+
- So far, 235+ issues, or 480+ if including duplicates, have been effectively solved in Sveltia CMS (Yes, you read it right)
|
|
137
137
|
- Target:
|
|
138
138
|
- 250 issues, or 500 if including duplicates, by GA — Almost there!
|
|
139
139
|
- 400 issues, or 800 if including duplicates, in the future 💪
|
|
@@ -147,7 +147,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
147
147
|
- Responding to requests from the maintainer’s clients
|
|
148
148
|
- Making the code clean and maintainable
|
|
149
149
|
|
|
150
|
-
<br>
|
|
151
151
|
|
|
152
152
|
## Differentiators
|
|
153
153
|
|
|
@@ -178,7 +178,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
178
178
|
- Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.5 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though some Netlify/Decap CMS features are [omitted](#features-not-to-be-implemented) or [unimplemented](#current-limitations) in Sveltia CMS, we have added a lot of new features. That’s the power of [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) + [Vite](https://vite.dev/).
|
|
179
179
|
- 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] (the useless `search` configuration option is therefore ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation fields.[^14]
|
|
180
180
|
- 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/).
|
|
181
|
-
- The Gitea backend is also faster because it utilizes an efficient API method introduced in Gitea 1.24.
|
|
181
|
+
- The Gitea/Forgejo backend is also faster because it utilizes an efficient API method introduced in Gitea 1.24 and Forgejo 12.0.
|
|
182
182
|
- Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern [File System Access API](https://developer.chrome.com/docs/capabilities/web-apis/file-system-access) to read and write files natively through the web browser, rather than using a slow, ad hoc REST API through a proxy server.
|
|
183
183
|
- Sorting, filtering and grouping of entries is done instantly without reloading the entire content.
|
|
184
184
|
- Uses caching, lazy loading and infinite scrolling techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
|
|
@@ -242,17 +242,19 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
242
242
|
|
|
243
243
|
### Better backend support
|
|
244
244
|
|
|
245
|
+
The [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapcms.org/docs/gitlab-backend/), [Gitea/Forgejo](https://decapcms.org/docs/gitea-backend/) and [Test](https://decapcms.org/docs/test-backend/) backends are available in Sveltia CMS. For [performance reasons](#features-not-to-be-implemented), we don’t support [Azure](https://decapcms.org/docs/azure-backend/), [Bitbucket](https://decapcms.org/docs/bitbucket-backend/) and [Git Gateway](https://decapcms.org/docs/git-gateway-backend/).
|
|
246
|
+
|
|
245
247
|
- 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.
|
|
246
248
|
- 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] If a branch name is specified, it works as expected.[^232]
|
|
247
249
|
- It’s possible to [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]
|
|
248
250
|
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
|
|
249
251
|
- Service status checks are performed frequently and an incident notification is displayed prominently.
|
|
250
|
-
- Users can quickly open the source file of an entry or asset in your repository
|
|
252
|
+
- Users can quickly open the source file of an entry or asset in your repository via the 3-dot menu when Developer Mode is enabled.
|
|
251
253
|
- We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
|
|
252
254
|
- The GitLab backend supports Git LFS ([documentation](https://docs.gitlab.com/topics/git/lfs/)).[^231]
|
|
253
255
|
- Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
|
|
254
|
-
- Our Gitea backend is high-performing because it retrieves multiple entries at once. It also supports Git LFS ([documentation](https://docs.gitea.com/administration/git-lfs-setup)). Additionally, the backend won’t cause 400 Bad Request errors due to the presence of `DRAFT_MEDIA_FILES` in file paths.[^222]
|
|
255
|
-
- The OAuth access token is automatically renewed when using the GitLab or Gitea backend with PKCE authorization.[^224] Token renewal for other backend configurations will be implemented later.
|
|
256
|
+
- Our Gitea/Forgejo backend is high-performing because it retrieves multiple entries at once. It also supports Git LFS ([documentation](https://docs.gitea.com/administration/git-lfs-setup)). Additionally, the backend won’t cause 400 Bad Request errors due to the presence of `DRAFT_MEDIA_FILES` in file paths.[^222]
|
|
257
|
+
- The OAuth access token is automatically renewed when using the GitLab or Gitea/Forgejo backend with PKCE authorization.[^224] Token renewal for other backend configurations will be implemented later.
|
|
256
258
|
- Features the all-new [local repository workflow](#working-with-a-local-git-repository) that boosts DX. See the [productivity section](#better-productivity) above.
|
|
257
259
|
- Developers can select the local and remote backends while working on a local server.
|
|
258
260
|
- The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194] The persistent storage support works with all modern browsers [except Safari](https://bugs.webkit.org/show_bug.cgi?id=254726).
|
|
@@ -411,6 +413,7 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
|
|
|
411
413
|
- The language switcher always appears in the user interface, so it’s easy to spot and change the selected language.
|
|
412
414
|
- Dynamic loading of language modes work as expected.[^198]
|
|
413
415
|
- A Code field under a List field work as expected, saving both code and language.[^181]
|
|
416
|
+
- A wrong initial value will not cause a crash with a `TypeError`.[^257]
|
|
414
417
|
- Color
|
|
415
418
|
- The widget doesn’t cause scrolling issues.[^128]
|
|
416
419
|
- The preview shows both the RGB(A) hex value and the `rgb()` function notation.
|
|
@@ -605,7 +608,6 @@ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are
|
|
|
605
608
|
|
|
606
609
|
- Comprehensive site config validation
|
|
607
610
|
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
|
|
608
|
-
- [Forgejo backend](https://decapcms.org/docs/gitea-backend/) ([#381](https://github.com/sveltia/sveltia-cms/issues/381))
|
|
609
611
|
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
610
612
|
- Field-specific media folders (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
|
|
611
613
|
- LineString and Polygon types for the [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
@@ -654,7 +656,7 @@ We have added support for features and file structures used in certain framework
|
|
|
654
656
|
### Backend support
|
|
655
657
|
|
|
656
658
|
- The GitLab backend requires GitLab 16.3 or later.
|
|
657
|
-
- The Gitea backend requires Gitea 1.24
|
|
659
|
+
- The Gitea/Forgejo backend requires Gitea 1.24, Forgejo 12.0 or later. The default origin of the `base_url` and `api_root` [backend options](https://decapcms.org/docs/backends-overview/#backend-configuration) is set to `https://gitea.com` (public free service) instead of `https://try.gitea.io` (test instance).
|
|
658
660
|
|
|
659
661
|
### Browser support
|
|
660
662
|
|
|
@@ -673,7 +675,7 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
|
|
|
673
675
|
|
|
674
676
|
### Installation & setup
|
|
675
677
|
|
|
676
|
-
Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Skip the [Choosing a Backend](https://decapcms.org/docs/choosing-a-backend/) page and choose the [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapcms.org/docs/gitlab-backend/) or [Gitea](https://decapcms.org/docs/gitea-backend/) backend instead. Then migrate to Sveltia CMS as described below.
|
|
678
|
+
Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Skip the [Choosing a Backend](https://decapcms.org/docs/choosing-a-backend/) page and choose the [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapcms.org/docs/gitlab-backend/) or [Gitea/Forgejo](https://decapcms.org/docs/gitea-backend/) backend instead. Then migrate to Sveltia CMS as described below.
|
|
677
679
|
|
|
678
680
|
Or try one of the starter kits for popular frameworks created by community members:
|
|
679
681
|
|
|
@@ -692,7 +694,7 @@ Unfortunately, we are unable to provide free installation and setup support at t
|
|
|
692
694
|
|
|
693
695
|
### Migration
|
|
694
696
|
|
|
695
|
-
Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub, GitLab or Gitea backend and don’t have any unsupported features like custom widgets or nested collections, migrating to Sveltia CMS is super easy — it works as a drop-in replacement.
|
|
697
|
+
Have a look at the [compatibility info](#compatibility) above first. If you’re already using Netlify/Decap CMS with the GitHub, GitLab or Gitea/Forgejo backend and don’t have any unsupported features like custom widgets or nested collections, migrating to Sveltia CMS is super easy — it works as a drop-in replacement.
|
|
696
698
|
|
|
697
699
|
Open `/admin/index.html` locally with an editor like VS Code and replace the CMS `<script>` tag with the new one:
|
|
698
700
|
|
|
@@ -810,7 +812,7 @@ Limitation: YAML anchors, aliases and merge keys only work if they are in the sa
|
|
|
810
812
|
|
|
811
813
|
### Working around an authentication error
|
|
812
814
|
|
|
813
|
-
If you get an “Authentication Aborted” error when trying to sign in to GitHub, GitLab or Gitea 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))
|
|
815
|
+
If you get an “Authentication Aborted” error when trying to sign in to GitHub, GitLab or Gitea/Forgejo 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))
|
|
814
816
|
|
|
815
817
|
### Working with a local Git repository
|
|
816
818
|
|
|
@@ -818,7 +820,7 @@ Sveltia CMS has simplified the local repository workflow by removing the need fo
|
|
|
818
820
|
|
|
819
821
|
Here are the workflow steps and tips:
|
|
820
822
|
|
|
821
|
-
1. Make sure you have configured the [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapcms.org/docs/gitlab-backend/) or [Gitea](https://decapcms.org/docs/gitea-backend/) backend.
|
|
823
|
+
1. Make sure you have configured the [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapcms.org/docs/gitlab-backend/) or [Gitea/Forgejo](https://decapcms.org/docs/gitea-backend/) backend.
|
|
822
824
|
- 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. Use `github`, `gitlab` or `gitea` for the `name` along with the `repo` definition. If you haven’t determined your repository name yet, just use a tentative name.
|
|
823
825
|
1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
|
|
824
826
|
1. Open `http://localhost:[port]/admin/index.html` with Chrome or Edge.
|
|
@@ -1419,7 +1421,7 @@ Then, add the following origins depending on your Git backend and enabled integr
|
|
|
1419
1421
|
```
|
|
1420
1422
|
https://gitlab.com https://status-api.hostedstatus.com
|
|
1421
1423
|
```
|
|
1422
|
-
- Gitea: (If you’re running a self-hosted instance, use the origin instead.)
|
|
1424
|
+
- Gitea/Forgejo: (If you’re running a self-hosted instance, use the origin instead.)
|
|
1423
1425
|
- `img-src`
|
|
1424
1426
|
```
|
|
1425
1427
|
https://gitea.com
|
|
@@ -1556,7 +1558,7 @@ Due early 2026
|
|
|
1556
1558
|
|
|
1557
1559
|
### Future
|
|
1558
1560
|
|
|
1559
|
-
- Tackling many of the remaining Netlify/Decap CMS issues, including MDX support,[^122] [manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214),[^125] [config editor](https://github.com/sveltia/sveltia-cms/discussions/452),[^10] offline support,[^238] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) (some of them may be included in v2.0)
|
|
1561
|
+
- Tackling many of the remaining Netlify/Decap CMS issues, including MDX support,[^122] [manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214),[^125] [tables in Markdown](https://github.com/sveltia/sveltia-cms/issues/455),[^256] [config editor](https://github.com/sveltia/sveltia-cms/discussions/452),[^10] offline support,[^238] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) (some of them may be included in v2.0)
|
|
1560
1562
|
- **Sveltia CMS Additions**: edge functions providing features that require server-side implementation, including user management (Netlify Identity alternative), roles,[^23] commits without a Git service account (Git Gateway alternative), API key management, post locking (like [WordPress](https://codex.wordpress.org/Post_Locking))[^166] and scheduled posts[^167]
|
|
1561
1563
|
- View, compare and restore revisions (like [WordPress](https://wordpress.com/support/page-post-revisions/))
|
|
1562
1564
|
- More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools, etc.
|
|
@@ -1844,7 +1846,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1844
1846
|
|
|
1845
1847
|
[^129]: Netlify/Decap CMS [#4961](https://github.com/decaporg/decap-cms/issues/4961), [#4979](https://github.com/decaporg/decap-cms/issues/4979), [#5545](https://github.com/decaporg/decap-cms/issues/5545), [#5778](https://github.com/decaporg/decap-cms/issues/5778), [#6279](https://github.com/decaporg/decap-cms/issues/6279), [#6464](https://github.com/decaporg/decap-cms/issues/6464), [#6810](https://github.com/decaporg/decap-cms/issues/6810), [#6922](https://github.com/decaporg/decap-cms/issues/6922), [#7118](https://github.com/decaporg/decap-cms/issues/7118), [#7293](https://github.com/decaporg/decap-cms/issues/7293) — A comment on one of the issues says the crash was due to Google Translate. Sveltia CMS has turned off Google Translate on the admin page.
|
|
1846
1848
|
|
|
1847
|
-
[^130]: Netlify/Decap CMS [#6571](https://github.com/decaporg/decap-cms/issues/6571)
|
|
1849
|
+
[^130]: Netlify/Decap CMS [#6571](https://github.com/decaporg/decap-cms/issues/6571), [#7539](https://github.com/decaporg/decap-cms/discussions/7539)
|
|
1848
1850
|
|
|
1849
1851
|
[^131]: Netlify/Decap CMS [#4429](https://github.com/decaporg/decap-cms/issues/4429)
|
|
1850
1852
|
|
|
@@ -2036,7 +2038,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
2036
2038
|
|
|
2037
2039
|
[^225]: Netlify/Decap CMS [#7401](https://github.com/decaporg/decap-cms/issues/7401)
|
|
2038
2040
|
|
|
2039
|
-
[^226]: Netlify/Decap CMS [#7031](https://github.com/decaporg/decap-cms/pull/7031)
|
|
2041
|
+
[^226]: Netlify/Decap CMS [#7031](https://github.com/decaporg/decap-cms/pull/7031), [#7540](https://github.com/decaporg/decap-cms/issues/7540)
|
|
2040
2042
|
|
|
2041
2043
|
[^227]: Netlify/Decap CMS [#6794](https://github.com/decaporg/decap-cms/pull/6794)
|
|
2042
2044
|
|
|
@@ -2095,3 +2097,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
2095
2097
|
[^254]: Netlify/Decap CMS [#7532](https://github.com/decaporg/decap-cms/issues/7532)
|
|
2096
2098
|
|
|
2097
2099
|
[^255]: Netlify/Decap CMS [#7355](https://github.com/decaporg/decap-cms/discussions/7355)
|
|
2100
|
+
|
|
2101
|
+
[^256]: Netlify/Decap CMS [#2845](https://github.com/decaporg/decap-cms/issues/2845)
|
|
2102
|
+
|
|
2103
|
+
[^257]: Netlify/Decap CMS [#4353](https://github.com/decaporg/decap-cms/issues/4353), [#7513](https://github.com/decaporg/decap-cms/issues/7513), [#7544](https://github.com/decaporg/decap-cms/issues/7544)
|