@sveltia/cms 0.104.1 → 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 CHANGED
@@ -807,27 +807,32 @@ You can also generate a personal access token (PAT) on GitHub or GitLab, and use
807
807
 
808
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.
809
809
 
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 to your project’s [VS Code settings file](https://code.visualstudio.com/docs/configure/settings#_settings-json-file) at `.vscode/settings.json`:
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`:
811
811
 
812
- ```json
813
- {
814
- "yaml.schemas": {
815
- "https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json": ["/static/admin/config.yml"]
816
- }
817
- }
812
+ ```yaml
813
+ # yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
818
814
  ```
819
815
 
820
- 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 same VS Code settings file:
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:
821
817
 
822
818
  ```json
823
- {
824
- "json.schemas": [
825
- {
826
- "fileMatch": ["/static/admin/config.json"],
827
- "url": "https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json"
828
- }
829
- ]
830
- }
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
+ ],
831
836
  ```
832
837
 
833
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.
@@ -1143,7 +1148,9 @@ Sveltia CMS comes with a handy translation API integration so that you can trans
1143
1148
  1. Select a translation service from the dropdown menu and paste your API key when prompted.
1144
1149
  1. The field(s) will be automatically translated.
1145
1150
 
1146
- 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 -->`.
1147
1154
 
1148
1155
  Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
1149
1156