@sveltia/cms 0.106.3 → 0.107.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 +21 -15
- package/dist/sveltia-cms.js +247 -257
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +247 -257
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +803 -466
- package/types/public.d.ts +269 -160
package/README.md
CHANGED
|
@@ -119,15 +119,15 @@ Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successo
|
|
|
119
119
|
|
|
120
120
|
- [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork
|
|
121
121
|
- Initial commit made in September 2022
|
|
122
|
-
- Discontinued in September 2024 after making meaningful improvements
|
|
122
|
+
- ❌ Discontinued in September 2024 after making meaningful improvements
|
|
123
123
|
- **Sveltia CMS**: not a fork but a **complete rewrite**
|
|
124
124
|
- Started in November 2022, first appeared on GitHub in March 2023
|
|
125
|
-
- Actively developed with frequent releases and numerous improvements
|
|
126
|
-
- Solved more than 250 issues reported in the Netlify/Decap CMS repository
|
|
125
|
+
- ✅ Actively developed with frequent releases and numerous improvements
|
|
126
|
+
- ✅ Solved more than 250 issues reported in the Netlify/Decap CMS repository
|
|
127
127
|
- [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version
|
|
128
128
|
- [Announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as an official continuation with a Netlify agency partner taking ownership
|
|
129
|
-
- Mostly low activity with occasional releases and a few minor improvements
|
|
130
|
-
- A [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28), high severity dependency vulnerabilities, fatal crashes and many other bugs remain unaddressed
|
|
129
|
+
- ⚠️ Mostly low activity with occasional releases and a few minor improvements
|
|
130
|
+
- ❌ A moderate severity [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28), high severity dependency vulnerabilities, fatal crashes and many other bugs remain unaddressed
|
|
131
131
|
|
|
132
132
|
Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt, and numerous bugs of Netlify CMS, which was launched in 2015. Our product is better by design:
|
|
133
133
|
|
|
@@ -156,6 +156,7 @@ Sveltia CMS is currently in **beta** and version 1.0 (GA) is expected to ship in
|
|
|
156
156
|
While we fix reported bugs as quickly as possible, usually within 24 hours, our 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 a complicated system involving various kinds of activities that require considerable effort:
|
|
157
157
|
|
|
158
158
|
- Ensuring substantial [compatibility with Netlify/Decap CMS](#current-limitations)
|
|
159
|
+
- Some missing features will be implemented before or shortly after GA
|
|
159
160
|
- Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
|
|
160
161
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
161
162
|
- So far, **250+ issues, or 550+ if including duplicates, have been effectively solved** in Sveltia CMS (Yes, you read it right)
|
|
@@ -201,7 +202,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
201
202
|
### Better performance
|
|
202
203
|
|
|
203
204
|
- Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast with [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead). Note that Svelte is a compiler and Sveltia CMS is framework-agnostic; it’s served as a vanilla JavaScript bundle.
|
|
204
|
-
- 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
|
|
205
|
+
- 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 significant reduction in size is thanks to the combination of [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) and [Vite](https://vite.dev/). Sveltia CMS also dynamically loads certain dependencies only when needed, further reducing the initial load time.
|
|
205
206
|
- 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]
|
|
206
207
|
- 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/).
|
|
207
208
|
- The Gitea/Forgejo backend is also faster because it utilizes an efficient API method introduced in Gitea 1.24 and Forgejo 12.0.
|
|
@@ -240,6 +241,7 @@ We’ve made various improvements to help you get your work done faster and more
|
|
|
240
241
|
- However, the Markdown widget was potentially vulnerable to XSS attacks because the `sanitize_preview` option was set to `false` by default for compatibility with Netlify/Decap CMS. This behaviour is [documented](https://decapcms.org/docs/widgets/#markdown) and is not a bug, but it’s definitely not secure. In [Sveltia CMS 0.105.0](https://github.com/sveltia/sveltia-cms/releases/tag/v0.105.0), we changed the default value to `true`, assuming that most users would prefer security over compatibility.
|
|
241
242
|
- Our [local repository workflow](#working-with-a-local-git-repository) does not require a proxy server. This reduces attack surfaces by eliminating the possibility of compromised dependencies[^158] and unauthorized API access.[^282]
|
|
242
243
|
- Thanks to pnpm, Vite, GitHub Actions and [npm package provenance](https://github.blog/security/supply-chain-security/introducing-npm-package-provenance/), our release process is fast, reliable and transparent. This setup makes it easy to verify the integrity of published code and assets. It also helps us avoid errors that can occur with manual build steps.[^264]
|
|
244
|
+
- We have enabled [trusted publishing](https://docs.npmjs.com/trusted-publishers) and [2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
|
|
243
245
|
- We have created a [security policy](https://github.com/sveltia/sveltia-cms/blob/main/SECURITY.md).
|
|
244
246
|
- We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS to prevent any unexpected errors or otherwise insecure configuration.[^108]
|
|
245
247
|
- The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive.[^34]
|
|
@@ -283,8 +285,8 @@ The [GitHub](https://decapcms.org/docs/github-backend/), [GitLab](https://decapc
|
|
|
283
285
|
- 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.[^65]
|
|
284
286
|
- 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]
|
|
285
287
|
- 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]
|
|
288
|
+
- The GitLab backend implements the GraphQL API with proper authorization.[^290]
|
|
286
289
|
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
|
|
287
|
-
- The GitLab backend properly supports authorization via the GraphQL API.[^290]
|
|
288
290
|
- Service status checks are performed frequently and an incident notification is displayed prominently.
|
|
289
291
|
- 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.
|
|
290
292
|
- We provide [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth) for GitHub and GitLab.
|
|
@@ -317,6 +319,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
317
319
|
- The `{{locale}}` template tag can be used in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language.[^63]
|
|
318
320
|
- It’s possible to embed the locale code in an entry by using `widget: hidden` along with `default: '{{locale}}'`.[^101]
|
|
319
321
|
- The `value_field` Relation field option can contain a locale prefix like `{{locale}}/{{slug}}`, which will be replaced with the current locale. It’s intended to support i18n in Astro. ([Discussion](https://github.com/sveltia/sveltia-cms/discussions/302))
|
|
322
|
+
- A collection filter is applied correctly when using the `single_file` i18n structure.[^291]
|
|
320
323
|
- User interface
|
|
321
324
|
- Eliminates UI confusion: The Preview Pane can be displayed without toggling i18n in the Content Editor. Both panes are scrollable. There is no condition where both panes are edited in the same language at the same time.
|
|
322
325
|
- Users can easily switch between locales while editing by clicking a button instead of a dropdown list when there are less than 5 locales.
|
|
@@ -640,13 +643,12 @@ These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are
|
|
|
640
643
|
- Comprehensive site config validation
|
|
641
644
|
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
642
645
|
- LineString and Polygon types for the [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
643
|
-
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
- [Event hooks](https://decapcms.org/docs/registering-events/) ([#167](https://github.com/sveltia/sveltia-cms/issues/167))
|
|
646
|
+
- Preview for [custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent)
|
|
647
|
+
- [Custom widgets](https://decapcms.org/docs/custom-widgets/)
|
|
648
|
+
- [Custom preview templates](https://decapcms.org/docs/customization/#registerpreviewtemplate) ([#51](https://github.com/sveltia/sveltia-cms/issues/51))
|
|
649
|
+
- [Event hooks](https://decapcms.org/docs/registering-events/) ([#167](https://github.com/sveltia/sveltia-cms/issues/167))
|
|
648
650
|
|
|
649
|
-
[Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md), [documentation](https://github.com/sveltia/sveltia-cms/issues/485) and [demo site](https://github.com/sveltia/sveltia-cms/issues/1) will all be prepared once the 1.0 Release Candidate is ready.
|
|
651
|
+
[Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md), [documentation](https://github.com/sveltia/sveltia-cms/issues/485) and a [demo site](https://github.com/sveltia/sveltia-cms/issues/1) will all be prepared once the 1.0 Release Candidate is ready.
|
|
650
652
|
|
|
651
653
|
Due to the complexity, we have decided to defer the following features to the 2.0 release due early/mid 2026. Netlify/Decap CMS has dozens of open issues with these collaboration and beta features — we want to implement them the right way.
|
|
652
654
|
|
|
@@ -671,7 +673,7 @@ The following Netlify/Decap CMS features will not be implemented, primarily due
|
|
|
671
673
|
- [Markdown](https://decapcms.org/docs/widgets/#markdown) widget: `editorComponents`
|
|
672
674
|
- [Number](https://decapcms.org/docs/widgets/#number) widget: `valueType`
|
|
673
675
|
- [Relation](https://decapcms.org/docs/widgets/#relation) widget: `displayFields`, `searchFields`, `valueField`
|
|
674
|
-
- Note: Some other camel case options, including Color widget options, are not deprecated.
|
|
676
|
+
- Note: Some other camel case options, including Color widget options, are not deprecated and will continue to work.
|
|
675
677
|
- The deprecated Date widget: It was removed from Decap CMS 3.0 and Sveltia CMS 0.10. Use the DateTime widget with the [`time_format: false` option](#changing-the-input-type-of-a-datetime-field) instead.
|
|
676
678
|
- The `allow_multiple` option for the File and Image widgets: It’s a confusing option that defaults to `true`, and there is a separate option called `media_library.config.multiple`. We have added the new `multiple` option instead, which is more intuitive and works with all media libraries.
|
|
677
679
|
- The theme and keymap inline settings for the Code widget, along with support for some languages. Instead of [CodeMirror](https://codemirror.net/), we use Lexical’s code block functionality powered by [Prism](https://prismjs.com/), which is slated to be [replaced by Shiki](https://github.com/facebook/lexical/issues/6575).
|
|
@@ -723,7 +725,7 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
|
|
|
723
725
|
|
|
724
726
|
### Deprecations
|
|
725
727
|
|
|
726
|
-
These options are deprecated and will be removed in
|
|
728
|
+
These options were added to Sveltia CMS 0.x but are now deprecated and will be removed in version 1.0:
|
|
727
729
|
|
|
728
730
|
- The `automatic_deployments` backend option. Use the new [`skip_ci` option](#disabling-automatic-deployments) instead, which is more intuitive. `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments: true` is equivalent to `skip_ci: false`.
|
|
729
731
|
- The `save_all_locales` i18n option. Use the [`initial_locales` option](#disabling-non-default-locale-content) instead, which provides more flexibility. `save_all_locales: false` is equivalent to `initial_locales: all`.
|
|
@@ -1911,12 +1913,14 @@ Due early/mid 2026
|
|
|
1911
1913
|
- Tackling even more Netlify/Decap CMS issues to bring the total number of issues solved to 300:
|
|
1912
1914
|
- [Manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214)[^125]
|
|
1913
1915
|
- [Directory navigation in the Asset Library](https://github.com/sveltia/sveltia-cms/issues/420)[^240]
|
|
1916
|
+
- and a few more from the TBD list below
|
|
1914
1917
|
|
|
1915
1918
|
### v3.0
|
|
1916
1919
|
|
|
1917
1920
|
- **Sveltia CMS Additions**: Edge functions for Cloudflare Workers and possibly other platforms that provide features that cannot be implemented client-side:
|
|
1918
1921
|
- User management (Netlify Identity alternative) with roles[^23]
|
|
1919
1922
|
- Commits without a Git service account (Git Gateway alternative)
|
|
1923
|
+
- more enhancements are planned for the future; see the TBD list below
|
|
1920
1924
|
- End-user documentation
|
|
1921
1925
|
- Contributor documentation
|
|
1922
1926
|
|
|
@@ -2582,3 +2586,5 @@ This project would not have been possible without the open source Netlify CMS pr
|
|
|
2582
2586
|
[^289]: Netlify/Decap CMS [#2183](https://github.com/decaporg/decap-cms/issues/2183)
|
|
2583
2587
|
|
|
2584
2588
|
[^290]: Netlify/Decap CMS [#7611](https://github.com/decaporg/decap-cms/issues/7611)
|
|
2589
|
+
|
|
2590
|
+
[^291]: Netlify/Decap CMS [#7612](https://github.com/decaporg/decap-cms/pull/7612)
|