@sveltia/cms 0.117.1 → 0.118.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
@@ -285,9 +285,8 @@ We’ve made various improvements to help you get your work done faster and more
285
285
  - Also supports [multiple configuration files](#providing-multiple-configuration-files) to allow developers to modularize the configuration.[^197]
286
286
  - 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.
287
287
  - We provide only one package, `@sveltia/cms`, instead of many (`decap-cms`, `decap-cms-app`, `decap-cms-core` and so on), which is simpler and less confusing.
288
- - Improved TypeScript support
288
+ - Improved TypeScript support:
289
289
  - We keep our type definitions for `CMS.init()` and other methods complete, accurate, up-to-date and annotated.[^190][^191][^192][^193][^227] This makes it easier to provide a site config object when [manually initializing](https://decapcms.org/docs/manual-initialization/) the CMS.
290
- - The `SiteConfig` type is exported from the main package, so you can import it directly to construct your configuration object with proper type checking outside of the `CMS.init()` method.
291
290
  - Config validation enhancements:
292
291
  - Sveltia CMS has additional validation rules designed to prevent common misconfigurations that could lead to runtime errors:
293
292
  - Common backend misconfigurations, such as an incorrect repository name or a missing OAuth client ID[^303]
@@ -853,7 +852,7 @@ You can now open `https://[hostname]/admin/` as usual to start editing. There is
853
852
 
854
853
  #### Editing the configuration file
855
854
 
856
- For a better DX, we recommend [setting up the JSON schema](#enabling-autocomplete-and-validation-for-the-configuration-file) for the site configuration file in your code editor. If you have the YAML extension installed, VS Code may automatically apply the outdated Netlify CMS config schema to `config.yml`. To use the latest Sveltia CMS config schema instead, you need to specify its URL.
855
+ For a better DX, we recommend [setting up the JSON schema](#enabling-autocomplete-and-validation-for-the-configuration-file) for the CMS configuration file in your code editor. If you have the YAML extension installed, VS Code may automatically apply the outdated Netlify CMS config schema to `config.yml`. To use the latest Sveltia CMS config schema instead, you need to specify its URL.
857
856
 
858
857
  #### Dealing with unsupported features
859
858
 
@@ -900,7 +899,7 @@ You can also generate a personal access token (PAT) on GitHub or GitLab, and use
900
899
 
901
900
  ### Enabling autocomplete and validation for the configuration file
902
901
 
903
- 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.
902
+ 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 CMS configuration. The schema is generated from the source and always up to date with the latest CMS version.
904
903
 
905
904
  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 comment to the top of `config.yml`:
906
905
 
@@ -949,7 +948,7 @@ Alternatively, you can [manually initialize](https://decapcms.org/docs/manual-in
949
948
 
950
949
  ### Providing multiple configuration files
951
950
 
952
- With Sveltia CMS, developers can modularize the site 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.
951
+ 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.
953
952
 
954
953
  ```html
955
954
  <link href="/admin/config.yml" type="application/yaml" rel="cms-config-url" />
@@ -1123,7 +1122,7 @@ Note that the special index file is placed right under the `folder`, regardless
1123
1122
 
1124
1123
  The singleton collection is an unnamed, non-nested variant of a [file collection](https://decapcms.org/docs/collection-file/) that can be used to manage a set of pre-defined data files. Singleton files appear in the content library’s sidebar under the Files group, and users can open the Content Editor directly without navigating to a file list. (If there are no other collections, the singleton collection appears as a regular file collection on desktop.)
1125
1124
 
1126
- To create this special file collection, add the new `singletons` option, along with an array of file definitions, to the root level of your site configuration.
1125
+ To create this special file collection, add the new `singletons` option, along with an array of file definitions, to the root level of your CMS configuration.
1127
1126
 
1128
1127
  This is a conventional file collection:
1129
1128
 
@@ -1612,7 +1611,10 @@ singletons:
1612
1611
  label: GitHub account
1613
1612
  ```
1614
1613
 
1615
- Note: The `root` option is ignored if the file or singleton contains multiple fields. You can still have subfields under the List field.
1614
+ Note: The `root` option is ignored in the following cases:
1615
+
1616
+ - The file or singleton contains multiple fields. You can still have subfields under the List field.
1617
+ - The file format is TOML, because TOML doesn’t support top-level arrays.
1616
1618
 
1617
1619
  ### Changing the input type of a DateTime field
1618
1620
 
@@ -2086,7 +2088,7 @@ Due late 2026
2086
2088
 
2087
2089
  Sveltia CMS is not a service but a client-side application that runs in your web browser. You don’t need an account to use the app, but you do need to authenticate with your Git hosting provider to read and write remote data. All content is stored in your Git repository. No data is sent to any server operated by us.
2088
2090
 
2089
- Depending on your site configuration, you will need to use an OAuth application hosted by yourself or a third party, such as Netlify or Cloudflare, to retrieve an access token from GitHub. Alternatively, you can provide an access token directly on the CMS’s sign-in page. In any case, your token is stored in your browser’s local storage, and subsequent API requests are made directly between your browser and the Git hosting provider.
2091
+ Depending on your CMS configuration, you will need to use an OAuth application hosted by yourself or a third party, such as Netlify or Cloudflare, to retrieve an access token from GitHub. Alternatively, you can provide an access token directly on the CMS’s sign-in page. In any case, your token is stored in your browser’s local storage, and subsequent API requests are made directly between your browser and the Git hosting provider.
2090
2092
 
2091
2093
  The CMS also integrates with various third-party services, including stock photo providers and translation services. These are “bring your own key” (BYOK) features that are entirely optional. You provide your own API keys for these services, which are stored in your browser’s local storage, and API requests are then made directly between your browser and the relevant service providers.
2092
2094