@sveltia/cms 0.118.1 → 0.119.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 +19 -6
- package/dist/sveltia-cms.js +274 -274
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +225 -225
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +3 -3
- package/schema/sveltia-cms.json +1 -1
- package/types/public.d.ts +6 -6
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ This free, open source successor to Netlify/Decap CMS is currently in public bet
|
|
|
64
64
|
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
65
65
|
- [Enabling autocomplete and validation for the configuration file](#enabling-autocomplete-and-validation-for-the-configuration-file)
|
|
66
66
|
- [Providing a JSON configuration file](#providing-a-json-configuration-file)
|
|
67
|
+
- [Providing a TOML configuration file](#providing-a-toml-configuration-file)
|
|
67
68
|
- [Providing multiple configuration files](#providing-multiple-configuration-files)
|
|
68
69
|
- [Working around an authentication error](#working-around-an-authentication-error)
|
|
69
70
|
- [Working with a local Git repository](#working-with-a-local-git-repository)
|
|
@@ -282,7 +283,7 @@ We’ve made various improvements to help you get your work done faster and more
|
|
|
282
283
|
### Better configuration
|
|
283
284
|
|
|
284
285
|
- We provide comprehensive [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.
|
|
285
|
-
- Sveltia CMS supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60]
|
|
286
|
+
- Sveltia CMS supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60] A [TOML configuration file](#providing-a-toml-configuration-file) is also supported.
|
|
286
287
|
- Also supports [multiple configuration files](#providing-multiple-configuration-files) to allow developers to modularize the configuration.[^197]
|
|
287
288
|
- 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] If you use [deprecated options](#deprecations) in a supported code editor, you should receive a warning.
|
|
288
289
|
- Improved TypeScript support:
|
|
@@ -376,7 +377,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
376
377
|
- A nested field can be specified using dot notation, e.g. `heroImage.src`.
|
|
377
378
|
- A wildcard in the field name is also supported, e.g. `images.*.src`.
|
|
378
379
|
- Multiple field names can be specified as an array for fallback purpose, e.g. `[thumbnail, cover]`.
|
|
379
|
-
- Occasionally, you may not have suitable images for thumbnails. For example, your images may have subtle differences or varied aspect ratios. In that case, you can disable the thumbnail with `thumbnail:
|
|
380
|
+
- Occasionally, you may not have suitable images for thumbnails. For example, your images may have subtle differences or varied aspect ratios. In that case, you can disable the thumbnail with `thumbnail: false`.
|
|
380
381
|
- If this option is omitted, any non-nested, non-empty Image or File field will be used.[^173] Sveltia CMS doesn’t have [hardcoded inference fields](https://github.com/decaporg/decap-cms/blob/899dba82d1f396260e0f84c6977c1d2aee809b59/packages/decap-cms-core/src/constants/fieldInference.tsx#L64-L72).[^130]
|
|
381
382
|
- `limit`: Specify the maximum number of entries that can be created in a folder collection.[^185]
|
|
382
383
|
- `divider`: [Add dividers to the collection list](#adding-dividers-to-the-collection-list).
|
|
@@ -723,7 +724,7 @@ The following Netlify/Decap CMS features will not be added to Sveltia CMS, prima
|
|
|
723
724
|
- Global: [`search`](https://decapcms.org/docs/configuration-options/#search)
|
|
724
725
|
- Backend: [`use_graphql`](https://decapcms.org/docs/github-backend/#graphql-api)
|
|
725
726
|
- Relation widget: `options_length`
|
|
726
|
-
- Local proxy server: As [mentioned above](#better-productivity), our [local repository workflow](#working-with-a-local-git-repository) eliminates the need for a proxy server. For security and performance reasons, we don’t support `netlify-cms-proxy-server
|
|
727
|
+
- Local proxy server: As [mentioned above](#better-productivity), our [local repository workflow](#working-with-a-local-git-repository) eliminates the need for a proxy server. For security and performance reasons, we don’t support `netlify-cms-proxy-server` or `decap-server`. The `local_backend` option is ignored.
|
|
727
728
|
- The global [`locale`](https://decapcms.org/docs/configuration-options/#locale) option and `CMS.registerLocale()` method: Sveltia CMS automatically detects the user’s preferred language and changes the UI locale as [mentioned above](#better-localization).
|
|
728
729
|
- [Undocumented methods](https://github.com/sveltia/sveltia-cms/blob/c69446da7bb0bab7405be741c0f92850c5dddfa8/src/main.js#L14-L37) exposed on the `CMS` object: This includes custom backends and custom media libraries, if any. We may support these features in the future, but our implementation would likely be incompatible with Netlify/Decap CMS.
|
|
729
730
|
- Any other undocumented features and options. Exceptions apply.
|
|
@@ -907,6 +908,12 @@ If you use VS Code, you can enable it for the YAML configuration file by install
|
|
|
907
908
|
# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
|
|
908
909
|
```
|
|
909
910
|
|
|
911
|
+
For TOML files, install the [Even Better TOML extension](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) and add the following comment to the top of `config.toml`:
|
|
912
|
+
|
|
913
|
+
```toml
|
|
914
|
+
#:schema https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
|
|
915
|
+
```
|
|
916
|
+
|
|
910
917
|
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:
|
|
911
918
|
|
|
912
919
|
```json
|
|
@@ -946,6 +953,14 @@ Sveltia CMS supports a configuration file written in the JSON format in addition
|
|
|
946
953
|
|
|
947
954
|
Alternatively, you can [manually initialize](https://decapcms.org/docs/manual-initialization/) the CMS with a JavaScript configuration object.
|
|
948
955
|
|
|
956
|
+
### Providing a TOML configuration file
|
|
957
|
+
|
|
958
|
+
Sveltia CMS supports TOML configuration files in addition to YAML and JSON. To use a TOML config file, add a `<link>` tag to your HTML with the type `application/toml`:
|
|
959
|
+
|
|
960
|
+
```html
|
|
961
|
+
<link href="path/to/config.toml" type="application/toml" rel="cms-config-url" />
|
|
962
|
+
```
|
|
963
|
+
|
|
949
964
|
### Providing multiple configuration files
|
|
950
965
|
|
|
951
966
|
With Sveltia CMS, developers can modularize the CMS configuration. Just provide multiple config links and the CMS will automatically merge them in the order of `<link>` tag appearance. It’s possible to use YAML, [JSON](#providing-a-json-configuration-file) or both.
|
|
@@ -1984,7 +1999,6 @@ Due early 2026
|
|
|
1984
1999
|
- Accessibility audit
|
|
1985
2000
|
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
|
|
1986
2001
|
- [Developer documentation](https://github.com/sveltia/sveltia-cms/issues/485) (implementation guide)
|
|
1987
|
-
- Marketing site
|
|
1988
2002
|
- [Live demo site](https://github.com/sveltia/sveltia-cms/issues/1)
|
|
1989
2003
|
|
|
1990
2004
|
See also the [1.0 RC](https://github.com/sveltia/sveltia-cms/milestone/1) and [1.0](https://github.com/sveltia/sveltia-cms/milestone/2) milestones for a list of issues planned for v1.0.
|
|
@@ -1995,11 +2009,10 @@ Due mid-2026
|
|
|
1995
2009
|
|
|
1996
2010
|
- Implementing [a few deferred Netlify/Decap CMS features](#current-limitations), including editorial workflow and nested collections, while addressing a number of bugs in their implementations
|
|
1997
2011
|
- They will probably first be included as beta features in v1.x releases
|
|
1998
|
-
- Tackling even more Netlify/Decap CMS issues:
|
|
2012
|
+
- Tackling even more Netlify/Decap CMS issues, including:
|
|
1999
2013
|
- [Manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214)[^125]
|
|
2000
2014
|
- [Directory navigation in the Asset Library](https://github.com/sveltia/sveltia-cms/issues/420)[^240]
|
|
2001
2015
|
- [Asset collections](https://github.com/sveltia/sveltia-cms/issues/301)[^271]
|
|
2002
|
-
- and a few more from the TBD list below
|
|
2003
2016
|
|
|
2004
2017
|
See also the [2.0](https://github.com/sveltia/sveltia-cms/milestone/3) milestone.
|
|
2005
2018
|
|