@sveltia/cms 0.104.2 → 0.104.3

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
@@ -473,7 +473,7 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
473
473
  - A combination of bold and italic doesn’t create a confusing 3-asterisk markup.[^160] In our editor, bold is 2 asterisks and italic is an underscore.
474
474
  - The built-in `image` component can be inserted with a single click.
475
475
  - The built-in `image` component allows users to add, edit or remove a link on an image.[^171] To disable this feature, add `linked_images: false` to the Markdown field options.
476
- - It’s possible to paste/drop local/remote images into the rich text editor to insert them as expected. Note: Pasting multiple images is [not supported in Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=864052). In Netlify/Decap CMS, pasting an image may cause the application to crash.
476
+ - It’s possible to paste/drop local/remote images into the rich text editor to insert them as expected. Note: Pasting multiple images is [not supported in Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=864052). In Netlify/Decap CMS, pasting an image may cause the application to crash.[^284]
477
477
  - The built-in `code-block` component is implemented just like a blockquote. You can simply convert a normal paragraph into a code block instead of adding a component.
478
478
  - Code in a code block in the editor can be copied as expected.[^165]
479
479
  - Language-annotated code block doesn’t trigger unsaved changes.[^189]
@@ -807,7 +807,7 @@ 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 line to the top of `config.yml`:
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 comment to the top of `config.yml`:
811
811
 
812
812
  ```yaml
813
813
  # yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
@@ -826,6 +826,9 @@ Alternatively, you can add the following to your project’s [VS Code settings f
826
826
  "yaml.schemas": {
827
827
  "https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json": ["/static/admin/config.yml"]
828
828
  },
829
+ ```
830
+
831
+ ```jsonc
829
832
  // For JSON config file
830
833
  "json.schemas": [
831
834
  {
@@ -837,7 +840,7 @@ Alternatively, you can add the following to your project’s [VS Code settings f
837
840
 
838
841
  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.
839
842
 
840
- If you use another code editor, check its documentation for how to enable JSON schema support for YAML or JSON files. The schema URL is `https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`.
843
+ If you use another code editor, check its documentation for how to enable JSON schema support for YAML or JSON files.
841
844
 
842
845
  ### Providing a JSON configuration file
843
846
 
@@ -1127,7 +1130,15 @@ The configuration for a [file collection](https://decapcms.org/docs/collection-f
1127
1130
 
1128
1131
  ### Translating entry fields with one click
1129
1132
 
1130
- Sveltia CMS comes with a handy translation API integration so that you can translate any text field from another locale without leaving the Content Editor. Currently, Google’s Cloud Translation, Anthropic’s Claude Haiku 3.5 and OpenAI’s GPT-3.5 Turbo are supported. To enable the quick translation feature:
1133
+ Sveltia CMS comes with a handy translation API integration so that you can translate any text field from another locale without leaving the Content Editor. Currently, the following services are supported:
1134
+
1135
+ - Google’s [Cloud Translation](https://cloud.google.com/translate)
1136
+ - Anthropic’s [Claude Haiku 3.5](https://www.anthropic.com/claude/haiku)
1137
+ - OpenAI’s [GPT-4o mini](https://platform.openai.com/docs/models/gpt-4o-mini)
1138
+
1139
+ Google’s API is very fast and offers a free tier. Other LLMs may produce more natural translations, but they are slower and require a paid plan. Choose the one that best fits your needs.
1140
+
1141
+ To enable the quick translation feature:
1131
1142
 
1132
1143
  1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
1133
1144
  1. Create a new API key for the translation service of your choice:
@@ -1148,13 +1159,20 @@ Sveltia CMS comes with a handy translation API integration so that you can trans
1148
1159
  1. Select a translation service from the dropdown menu and paste your API key when prompted.
1149
1160
  1. The field(s) will be automatically translated.
1150
1161
 
1151
- You can also provide your API keys in the Settings dialog or change the default translation service.
1162
+ Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
1152
1163
 
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 -->`.
1164
+ You can also provide your API keys in the Settings dialog or change the default translation service. API keys are stored in the browser’s local storage, so you don’t need to enter them every time.
1154
1165
 
1155
- Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
1166
+ 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. For Anthropic and OpenAI, you can also use the `notranslate` comment to exclude specific parts of Markdown content from translation:
1167
+
1168
+ ```html
1169
+ <div translate="no">...</div>
1170
+ <span class="notranslate">...</span>
1171
+ <!-- notranslate -->...<!-- /notranslate -->
1172
+ {/* notranslate */}...{/* /notranslate */}
1173
+ ```
1156
1174
 
1157
- Earlier versions of Sveltia CMS included DeepL integration, but it has been disabled [due to an API limitation](https://github.com/sveltia/sveltia-cms/issues/437). More translation services will be added in the future.
1175
+ Earlier versions of Sveltia CMS included DeepL integration, but we had to disable it [due to an API limitation](https://github.com/sveltia/sveltia-cms/issues/437). More translation services will be added in the future.
1158
1176
 
1159
1177
  ### Localizing entry slugs
1160
1178
 
@@ -1809,7 +1827,7 @@ Due early 2026
1809
1827
 
1810
1828
  ## Trivia
1811
1829
 
1812
- - The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. There was also an [attempt](https://github.com/decaporg/decap-cms/issues/328) to replace React with Preact. Now we have completely rewritten it in Svelte 4 and then Svelte 5. So this is effectively the third/fourth time the application has gone through a framework migration. One more thing: We may migrate to [Ripple](https://www.ripplejs.com/) in the future if it looks promising.
1830
+ - The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. There was also an [attempt](https://github.com/decaporg/decap-cms/issues/328) to replace React with Preact. Now we have completely rebuilt it in Svelte 4 and then in Svelte 5. So this is effectively the third/fourth time the application has gone through a framework migration. One more thing: We may migrate to [Ripple](https://www.ripplejs.com/) in the future if it looks promising.
1813
1831
  - Our [local repository workflow](#working-with-a-local-git-repository) shares implementation with the Test backend, as both utilize the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API), allowing us to reduce maintenance costs. The seamless local workflow is critical not only for improved DX, but also for our rapid application development.
1814
1832
 
1815
1833
  ## Related Links
@@ -1969,7 +1987,7 @@ This software is provided “as is” without any express or implied warranty. W
1969
1987
 
1970
1988
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
1971
1989
 
1972
- [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531), [#7535](https://github.com/decaporg/decap-cms/issues/7535), [#7553](https://github.com/decaporg/decap-cms/issues/7553), [#7561](https://github.com/decaporg/decap-cms/issues/7561), [#7584](https://github.com/decaporg/decap-cms/issues/7584)
1990
+ [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531), [#7535](https://github.com/decaporg/decap-cms/issues/7535), [#7553](https://github.com/decaporg/decap-cms/issues/7553), [#7561](https://github.com/decaporg/decap-cms/issues/7561), [#7584](https://github.com/decaporg/decap-cms/issues/7584), [#7591](https://github.com/decaporg/decap-cms/issues/7591)
1973
1991
 
1974
1992
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
1975
1993
 
@@ -2390,3 +2408,5 @@ This software is provided “as is” without any express or implied warranty. W
2390
2408
  [^282]: Netlify/Decap CMS [#7579](https://github.com/decaporg/decap-cms/pull/7579)
2391
2409
 
2392
2410
  [^283]: Netlify/Decap CMS [#713](https://github.com/decaporg/decap-cms/issues/713)
2411
+
2412
+ [^284]: Netlify/Decap CMS [#7585](https://github.com/decaporg/decap-cms/issues/7585)