@sveltia/cms 0.104.0 → 0.104.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 +55 -41
- package/dist/sveltia-cms.js +250 -257
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +253 -260
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +4 -0
package/README.md
CHANGED
|
@@ -44,9 +44,9 @@ Welcome to the only Netlify CMS successor you can trust!
|
|
|
44
44
|
- [Better customization](#better-customization)
|
|
45
45
|
- [Better localization](#better-localization)
|
|
46
46
|
- [Compatibility](#compatibility)
|
|
47
|
+
- [Current limitations](#current-limitations)
|
|
47
48
|
- [Features not to be implemented](#features-not-to-be-implemented)
|
|
48
49
|
- [Other breaking changes](#other-breaking-changes)
|
|
49
|
-
- [Current limitations](#current-limitations)
|
|
50
50
|
- [Compatibility with Static CMS](#compatibility-with-static-cms)
|
|
51
51
|
- [Framework support](#framework-support)
|
|
52
52
|
- [Backend support](#backend-support)
|
|
@@ -244,6 +244,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
|
|
|
244
244
|
|
|
245
245
|
### Better configuration
|
|
246
246
|
|
|
247
|
+
- We provide clear [compatibility information](#compatibility) to help you avoid unsupported options and configurations that might cause errors. By contrast, the Netlify/Decap CMS documentation does not mention the deprecation of camel case options, the removal of the Date widget and the replacement of Moment.js.
|
|
247
248
|
- Sveltia CMS supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60]
|
|
248
249
|
- Also supports [multiple configuration files](#providing-multiple-configuration-files) to allow developers to modularize the configuration.[^197]
|
|
249
250
|
- We provide an [up-to-date JSON schema](#enabling-autocomplete-and-validation-for-the-configuration-file) for YAML/JSON configuration files, which enables autocomplete and validation in VS Code and other editors.[^253]
|
|
@@ -601,12 +602,36 @@ We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possib
|
|
|
601
602
|
|
|
602
603
|
However, 100% feature parity is never planned, and some features are still missing or will not be added due to performance, deprecation and other factors. Look at the compatibility info below to see if you can migrate now or in the near future.
|
|
603
604
|
|
|
605
|
+
### Current limitations
|
|
606
|
+
|
|
607
|
+
These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release due late 2025. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) and [Bluesky](https://bsky.app/profile/sveltiacms.app) for updates.
|
|
608
|
+
|
|
609
|
+
- Comprehensive site config validation
|
|
610
|
+
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
611
|
+
- LineString and Polygon types for the [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
612
|
+
- Advanced customization features:
|
|
613
|
+
- Preview for [custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent)
|
|
614
|
+
- [Custom widgets](https://decapcms.org/docs/custom-widgets/)
|
|
615
|
+
- [Custom preview templates](https://decapcms.org/docs/customization/#registerpreviewtemplate) ([#51](https://github.com/sveltia/sveltia-cms/issues/51))
|
|
616
|
+
- [Event hooks](https://decapcms.org/docs/registering-events/) ([#167](https://github.com/sveltia/sveltia-cms/issues/167))
|
|
617
|
+
|
|
618
|
+
[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.
|
|
619
|
+
|
|
620
|
+
Due to the complexity, we have decided to defer the following features to the 2.0 release due early 2026. Netlify/Decap CMS has dozens of open issues with these collaboration and beta features — we want to implement them the right way.
|
|
621
|
+
|
|
622
|
+
- [Editorial workflow](https://decapcms.org/docs/editorial-workflows/)
|
|
623
|
+
- [Open authoring](https://decapcms.org/docs/open-authoring/)
|
|
624
|
+
- [Nested collections](https://decapcms.org/docs/collection-nested/) (beta)
|
|
625
|
+
- The `media_folder` and `public_folder` options (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets ([#497](https://github.com/sveltia/sveltia-cms/issues/497))
|
|
626
|
+
|
|
604
627
|
### Features not to be implemented
|
|
605
628
|
|
|
629
|
+
The following Netlify/Decap CMS features will not be implemented, primarily due to deprecation and performance considerations.
|
|
630
|
+
|
|
606
631
|
- **Azure and Bitbucket backends**: For performance reasons. We’ll support these platforms if their APIs improve to allow the CMS to fetch multiple entries at once.
|
|
607
632
|
- **Git Gateway backend**: Also for performance reasons. [Git Gateway](https://github.com/netlify/git-gateway) has not been actively maintained since Netlify CMS was abandoned, and it’s known to be slow and prone to rate limit violations. We plan to develop a GraphQL-based high-performance alternative [in the future](#roadmap).
|
|
608
633
|
- **Netlify Identity Widget**: It’s not useful without Git Gateway, and the Netlify Identity service itself is now [deprecated](https://www.netlify.com/changelog/deprecation-netlify-identity/). We plan to develop an alternative solution with role support [in the future](#roadmap), most likely using [Cloudflare Workers](https://workers.cloudflare.com/) and [Auth.js](https://authjs.dev/).
|
|
609
|
-
- [Gatsby plugin](https://github.com/decaporg/gatsby-plugin-decap-cms):
|
|
634
|
+
- [Gatsby plugin](https://github.com/decaporg/gatsby-plugin-decap-cms): In light of Gatsby’s [decline](https://2024.stateofjs.com/en-US/libraries/meta-frameworks/) and [apparent ending](https://github.com/gatsbyjs/gatsby/discussions/39062), we won’t be investing time in developing a plugin for it. You can still create `index.html` yourself. Note: We don’t support Netlify Identity Widget; the favicon can be specified with the `logo_url` option.
|
|
610
635
|
- The deprecated client-side implicit grant for the GitLab backend: It has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
|
|
611
636
|
- The deprecated Netlify Large Media service: Consider other storage providers.
|
|
612
637
|
- Deprecated camel case configuration options: Use snake case instead, according to the current Decap CMS document.
|
|
@@ -617,7 +642,7 @@ However, 100% feature parity is never planned, and some features are still missi
|
|
|
617
642
|
- [Relation](https://decapcms.org/docs/widgets/#relation) widget: `displayFields`, `searchFields`, `valueField`
|
|
618
643
|
- Note: Some other camel case options, including Color widget options, are not deprecated.
|
|
619
644
|
- 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.
|
|
620
|
-
- 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
|
|
645
|
+
- 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).
|
|
621
646
|
- Remark plugins for the Markdown widget: Not compatible with our Lexical-based rich text editor.
|
|
622
647
|
- An absolute URL in the [`public_folder`](https://decapcms.org/docs/configuration-options/#public-folder) option: Such configuration is not recommended, as stated in the Netlify/Decap CMS document.
|
|
623
648
|
- Performance-related options: Sveltia CMS has [drastically improved performance](#better-performance) with GraphQL enabled by default, so these are no longer relevant:
|
|
@@ -638,26 +663,6 @@ There are some differences in behaviour between Sveltia CMS and Netlify/Decap CM
|
|
|
638
663
|
|
|
639
664
|
[Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=bug) if you have encounter any compatibility issues that are not listed here.
|
|
640
665
|
|
|
641
|
-
### Current limitations
|
|
642
|
-
|
|
643
|
-
These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release due late 2025. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) and [Bluesky](https://bsky.app/profile/sveltiacms.app) for updates.
|
|
644
|
-
|
|
645
|
-
- Comprehensive site config validation
|
|
646
|
-
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
|
|
647
|
-
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
648
|
-
- LineString and Polygon types for the [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
649
|
-
- [Custom widgets](https://decapcms.org/docs/custom-widgets/)
|
|
650
|
-
- Preview for [custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent)
|
|
651
|
-
- [Custom preview templates](https://decapcms.org/docs/customization/#registerpreviewtemplate) ([#51](https://github.com/sveltia/sveltia-cms/issues/51))
|
|
652
|
-
- [Event hooks](https://decapcms.org/docs/registering-events/) ([#167](https://github.com/sveltia/sveltia-cms/issues/167))
|
|
653
|
-
|
|
654
|
-
Due to the complexity, we have decided to defer the following features to the 2.0 release due early 2026. Netlify/Decap CMS has dozens of open issues with these collaboration and beta features — we want to implement them the right way.
|
|
655
|
-
|
|
656
|
-
- [Editorial workflow](https://decapcms.org/docs/editorial-workflows/)
|
|
657
|
-
- [Open authoring](https://decapcms.org/docs/open-authoring/)
|
|
658
|
-
- [Nested collections](https://decapcms.org/docs/collection-nested/) (beta)
|
|
659
|
-
- The `media_folder` and `public_folder` options (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets ([#497](https://github.com/sveltia/sveltia-cms/issues/497))
|
|
660
|
-
|
|
661
666
|
### Compatibility with Static CMS
|
|
662
667
|
|
|
663
668
|
Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. Since Static CMS was archived some time ago, we don’t plan to implement additional compatibility beyond what’s listed below. However, we may still adopt some of their features that we find useful.
|
|
@@ -691,6 +696,8 @@ We have added support for features and file structures used in certain framework
|
|
|
691
696
|
|
|
692
697
|
### Backend support
|
|
693
698
|
|
|
699
|
+
Sveltia CMS supports the GitHub, GitLab and Gitea/Forgejo [backends](#better-backend-support). The Test backend is also available for local testing. There are a few differences compared to Netlify/Decap CMS:
|
|
700
|
+
|
|
694
701
|
- The GitLab backend requires GitLab 16.3 or later.
|
|
695
702
|
- 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).
|
|
696
703
|
|
|
@@ -800,27 +807,32 @@ You can also generate a personal access token (PAT) on GitHub or GitLab, and use
|
|
|
800
807
|
|
|
801
808
|
Sveltia CMS provides a full [JSON schema](https://json-schema.org/) for the configuration file, so you can get autocomplete and validation in your favourite code editor while editing the site configuration. The schema is generated from the source and always up to date with the latest CMS version.
|
|
802
809
|
|
|
803
|
-
If you use VS Code, you can enable it for the YAML configuration file by installing the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and adding the following to
|
|
810
|
+
If you use VS Code, you can enable it for the YAML configuration file by installing the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and adding the following line to the top of `config.yml`:
|
|
804
811
|
|
|
805
|
-
```
|
|
806
|
-
|
|
807
|
-
"yaml.schemas": {
|
|
808
|
-
"https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json": ["/static/admin/config.yml"]
|
|
809
|
-
}
|
|
810
|
-
}
|
|
812
|
+
```yaml
|
|
813
|
+
# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
|
|
811
814
|
```
|
|
812
815
|
|
|
813
|
-
If your configuration is in JSON format (see the [next section](#providing-a-json-configuration-file)), no extension is needed. Just add the following to the
|
|
816
|
+
If your configuration is in JSON format (see the [next section](#providing-a-json-configuration-file)), no extension is needed. Just add the following line to the top of `config.json`, within the curly braces:
|
|
814
817
|
|
|
815
818
|
```json
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
819
|
+
"$schema": "https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json",
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
Alternatively, you can add the following to your project’s [VS Code settings file](https://code.visualstudio.com/docs/configure/settings#_settings-json-file) at `.vscode/settings.json`, within the outer curly braces:
|
|
823
|
+
|
|
824
|
+
```jsonc
|
|
825
|
+
// For YAML config file
|
|
826
|
+
"yaml.schemas": {
|
|
827
|
+
"https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json": ["/static/admin/config.yml"]
|
|
828
|
+
},
|
|
829
|
+
// For JSON config file
|
|
830
|
+
"json.schemas": [
|
|
831
|
+
{
|
|
832
|
+
"fileMatch": ["/static/admin/config.json"],
|
|
833
|
+
"url": "https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
824
836
|
```
|
|
825
837
|
|
|
826
838
|
The configuration file location varies by framework and project structure, so adjust the path accordingly. For example, if you use Astro, the file is typically located in the `/public/admin/` directory.
|
|
@@ -1136,7 +1148,9 @@ Sveltia CMS comes with a handy translation API integration so that you can trans
|
|
|
1136
1148
|
1. Select a translation service from the dropdown menu and paste your API key when prompted.
|
|
1137
1149
|
1. The field(s) will be automatically translated.
|
|
1138
1150
|
|
|
1139
|
-
You can also provide your API keys in the Settings dialog.
|
|
1151
|
+
You can also provide your API keys in the Settings dialog or change the default translation service.
|
|
1152
|
+
|
|
1153
|
+
If you don’t want some text to be translated, use the HTML [`translate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/translate) attribute or [`notranslate`](https://developers.google.com/search/blog/2008/10/helping-you-break-language-barrier) class, e.g. `<div translate="no">...</div>` or `<span class="notranslate">...</span>`. For Anthropic and OpenAI, you can also use the `notranslate` comment to exclude specific parts of Markdown content from translation, e.g. `<!-- notranslate -->...<!-- /notranslate -->`.
|
|
1140
1154
|
|
|
1141
1155
|
Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
|
|
1142
1156
|
|
|
@@ -1725,7 +1739,7 @@ Due late 2025
|
|
|
1725
1739
|
- [Entry pre-validation/normalization](https://github.com/sveltia/sveltia-cms/issues/395)[^248]
|
|
1726
1740
|
- Accessibility audit
|
|
1727
1741
|
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
|
|
1728
|
-
- Developer documentation (implementation guide)
|
|
1742
|
+
- [Developer documentation](https://github.com/sveltia/sveltia-cms/issues/485) (implementation guide)
|
|
1729
1743
|
- Marketing site
|
|
1730
1744
|
- [Live demo site](https://github.com/sveltia/sveltia-cms/issues/1)
|
|
1731
1745
|
|