@sveltia/cms 0.88.2 → 0.89.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.
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
  ![Built-in image optimizer for WebP and SVG; mobile & tablet support](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-5.webp?20250409)<br>
16
16
 
17
- ![Streamlined local and remote workflow; GitHub, GitLab & Gitea support; single-line migration from Netlify/Decap CMS (depending on your current setup); Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-6.webp?20250526)<br>
17
+ ![Streamlined local and remote workflow; GitHub, GitLab Gitea & Forgejo support; single-line migration from Netlify/Decap CMS (depending on your current setup); Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/screenshot-6.webp?20250526)<br>
18
18
 
19
19
  ## Table of contents
20
20
 
@@ -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.
@@ -247,12 +247,12 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
247
247
  - 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
248
  - The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
249
249
  - 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 using View on GitHub (or GitLab or Gitea) under the 3-dot menu when Developer Mode is enabled.
250
+ - 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
251
  - We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
252
252
  - The GitLab backend supports Git LFS ([documentation](https://docs.gitlab.com/topics/git/lfs/)).[^231]
253
253
  - 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.
254
+ - 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]
255
+ - 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
256
  - Features the all-new [local repository workflow](#working-with-a-local-git-repository) that boosts DX. See the [productivity section](#better-productivity) above.
257
257
  - Developers can select the local and remote backends while working on a local server.
258
258
  - 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).
@@ -605,7 +605,6 @@ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are
605
605
 
606
606
  - Comprehensive site config validation
607
607
  - [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
608
  - [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
609
  - Field-specific media folders (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
611
610
  - LineString and Polygon types for the [Map](https://decapcms.org/docs/widgets/#map) widget
@@ -654,7 +653,7 @@ We have added support for features and file structures used in certain framework
654
653
  ### Backend support
655
654
 
656
655
  - The GitLab backend requires GitLab 16.3 or later.
657
- - The Gitea backend requires Gitea 1.24 or later. It’s not compatible with Forgejo at this time due to API differences. Support for Forgejo is tracked in [#381](https://github.com/sveltia/sveltia-cms/issues/381). 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).
656
+ - 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
657
 
659
658
  ### Browser support
660
659
 
@@ -673,7 +672,7 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
673
672
 
674
673
  ### Installation & setup
675
674
 
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.
675
+ 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
676
 
678
677
  Or try one of the starter kits for popular frameworks created by community members:
679
678
 
@@ -692,7 +691,7 @@ Unfortunately, we are unable to provide free installation and setup support at t
692
691
 
693
692
  ### Migration
694
693
 
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.
694
+ 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
695
 
697
696
  Open `/admin/index.html` locally with an editor like VS Code and replace the CMS `<script>` tag with the new one:
698
697
 
@@ -810,7 +809,7 @@ Limitation: YAML anchors, aliases and merge keys only work if they are in the sa
810
809
 
811
810
  ### Working around an authentication error
812
811
 
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))
812
+ 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
813
 
815
814
  ### Working with a local Git repository
816
815
 
@@ -818,7 +817,7 @@ Sveltia CMS has simplified the local repository workflow by removing the need fo
818
817
 
819
818
  Here are the workflow steps and tips:
820
819
 
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.
820
+ 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
821
  - 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
822
  1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
824
823
  1. Open `http://localhost:[port]/admin/index.html` with Chrome or Edge.
@@ -1419,7 +1418,7 @@ Then, add the following origins depending on your Git backend and enabled integr
1419
1418
  ```
1420
1419
  https://gitlab.com https://status-api.hostedstatus.com
1421
1420
  ```
1422
- - Gitea: (If you’re running a self-hosted instance, use the origin instead.)
1421
+ - Gitea/Forgejo: (If you’re running a self-hosted instance, use the origin instead.)
1423
1422
  - `img-src`
1424
1423
  ```
1425
1424
  https://gitea.com
@@ -1844,7 +1843,7 @@ This software is provided “as is” without any express or implied warranty. W
1844
1843
 
1845
1844
  [^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
1845
 
1847
- [^130]: Netlify/Decap CMS [#6571](https://github.com/decaporg/decap-cms/issues/6571)
1846
+ [^130]: Netlify/Decap CMS [#6571](https://github.com/decaporg/decap-cms/issues/6571), [#7539](https://github.com/decaporg/decap-cms/discussions/7539)
1848
1847
 
1849
1848
  [^131]: Netlify/Decap CMS [#4429](https://github.com/decaporg/decap-cms/issues/4429)
1850
1849