@sveltia/cms 0.30.0 → 0.31.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 +94 -68
- package/dist/sveltia-cms.js +153 -153
- package/dist/sveltia-cms.mjs +160 -160
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -26,14 +26,16 @@ Sveltia CMS is **still in beta**, so please be careful when trying it out.
|
|
|
26
26
|
|
|
27
27
|
While we are fixing reported bugs as fast as we can, usually within 24 hours, the overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also involves different kinds of activities:
|
|
28
28
|
|
|
29
|
-
- Ensuring maximum compatibility with existing versions of Netlify/Decap CMS
|
|
29
|
+
- Ensuring maximum [compatibility with existing versions of Netlify/Decap CMS](#compatibility)
|
|
30
30
|
- Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible
|
|
31
|
-
- So far,
|
|
32
|
-
- [Let us know](https://github.com/sveltia/sveltia-cms/issues/new) if you have
|
|
31
|
+
- So far, 100+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 150 by GA and 250 in later releases.
|
|
32
|
+
- [Let us know](https://github.com/sveltia/sveltia-cms/issues/new) if you have any specific issues you’d like to see solved!
|
|
33
33
|
- Responding to user feedback
|
|
34
|
-
- Implementing our own enhancement ideas
|
|
34
|
+
- Implementing our own UX enhancement ideas
|
|
35
35
|
|
|
36
|
-
Sveltia CMS **version 1.0 is expected to ship in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates.
|
|
36
|
+
Sveltia CMS **version 1.0 is expected to ship in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates. See also our [roadmap](#roadmap).
|
|
37
|
+
|
|
38
|
+
<br>
|
|
37
39
|
|
|
38
40
|
## Features
|
|
39
41
|
|
|
@@ -43,11 +45,11 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
43
45
|
|
|
44
46
|
- Ready to be used as a drop-in replacement for Netlify/Decap CMS _in some casual use case scenarios_ with a single line of code update.
|
|
45
47
|
- Your existing [configuration file](https://decapcms.org/docs/configuration-options/) can be reused as is.
|
|
46
|
-
-
|
|
48
|
+
- Some features are still missing or will not be added though — look at the [compatibility info](#compatibility) below to see if you can migrate now or soon.
|
|
47
49
|
|
|
48
50
|
### Better UX
|
|
49
51
|
|
|
50
|
-
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant UX
|
|
52
|
+
- Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
|
|
51
53
|
- Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
|
|
52
54
|
- Comes with touch device support. While the UI is not yet optimized for small screens, large tablets like iPad Pro or Pixel Tablet should work well. Mobile support is planned after the 1.0 release.
|
|
53
55
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid fatal React app crashes[^999]. Best of all, Svelte offers great performance!
|
|
@@ -67,10 +69,11 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
67
69
|
### Better productivity
|
|
68
70
|
|
|
69
71
|
- You can [work with a local Git repository](#working-with-a-local-git-repository) without any extra configuration or proxy server[^26].
|
|
72
|
+
- Deleting an entry or asset file also deletes the empty enclosing folder, so you don’t have to delete it manually.
|
|
70
73
|
- In addition to a streamlined workflow, it offers great performance by loading files natively through the browser rather than using a slow, ad hoc REST API.
|
|
71
74
|
- It also avoids a number of issues, including the 30 MB file size limit[^51], an unknown error with `publish_mode`[^75], and an unused `logo_url`[^49].
|
|
72
75
|
- Eliminates some workflow disruptions in the Content Editor:
|
|
73
|
-
- A local backup of an entry draft is automatically created without interruption by a confirmation dialog.
|
|
76
|
+
- A local backup of an entry draft is automatically created without interruption by a confirmation dialog, which annoys users and can cause a page navigation problem if dismissed[^106]. The backup can then be reliably restored without unexpected overwriting[^85].
|
|
74
77
|
- Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
|
|
75
78
|
- The editor closes automatically when an entry is saved.
|
|
76
79
|
- You can upload multiple assets at once[^5].
|
|
@@ -83,62 +86,74 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
83
86
|
- Improved keyboard handling lets you efficiently navigate through UI elements using the Tab, Space, Enter and arrow keys[^17][^67].
|
|
84
87
|
- Comprehensive [WAI-ARIA](https://w3c.github.io/aria/) support enables users who rely on screen readers such as NVDA and VoiceOver.
|
|
85
88
|
- Ensures sufficient contrast between the foreground text and background colours.
|
|
89
|
+
- Enabled and disabled buttons can be clearly distinguished[^105].
|
|
86
90
|
- Honours your operating system’s [reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) and [reduced transparency](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-transparency) settings.
|
|
87
91
|
- We’ll continue to test and improve the application to meet [WCAG 2.2](https://w3c.github.io/wcag/guidelines/22/).
|
|
88
92
|
|
|
89
93
|
### Better security
|
|
90
94
|
|
|
91
95
|
- Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases[^33].
|
|
92
|
-
- We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS.
|
|
96
|
+
- We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS to prevent any unexpected errors or otherwise insecure configuration[^108].
|
|
93
97
|
- The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive[^34].
|
|
94
98
|
- The `same-origin` referrer policy is automatically set with a `<meta>` tag.
|
|
95
99
|
|
|
100
|
+
### Better configuration
|
|
101
|
+
|
|
102
|
+
- Some servers and frameworks remove the trailing slash from the CMS URL (`/admin`) depending on the configuration. In such cases, the config file is loaded from a root-relative URL (`/admin/config.yml`) instead of a regular relative URL (`./config.yml` = `/config.yml`) that results in a 404 Not Found error[^107].
|
|
103
|
+
- Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections[^60].
|
|
104
|
+
|
|
96
105
|
### Better backend support
|
|
97
106
|
|
|
98
107
|
- Uses the GraphQL API where possible for better performance, as mentioned above. You don’t need to set the `use_graphql` option to enable it for GitHub and GitLab.
|
|
99
108
|
- The Git branch name is automatically set to the repository’s default branch (`main`, `master` or whatever) if not specified in the configuration file, preventing data loading errors due to a hardcoded fallback to `master`[^95][^27].
|
|
100
109
|
- You can [disable automatic deployments](#disabling-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
|
|
101
|
-
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
|
|
110
|
+
- The GitLab backend support comes with background [service status](https://status.gitlab.com/) checking, just like GitHub.
|
|
111
|
+
- Service status checks are performed frequently and an incident notification is displayed prominently.
|
|
102
112
|
- You can quickly open the source file of an entry or asset in your repository using View on GitHub (or GitLab) under the 3-dot menu.
|
|
103
113
|
|
|
104
114
|
### Better i18n support
|
|
105
115
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- [
|
|
114
|
-
- You can [
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
116
|
+
Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect first-class internationalization (i18n) support, as it’s required by clients of maintainer [@kyoshino](https://github.com/kyoshino), who himself was a long-time Japanese localizer for Mozilla and currently lives in a [city](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
|
|
117
|
+
|
|
118
|
+
- Configuration
|
|
119
|
+
- Supports multiple files/folders i18n structure for file collections[^87]. To enable it, simply use the `{{locale}}` template tag in the `file` path option, e.g. `content/pages/about.{{locale}}.json` or `content/pages/{{locale}}/about.json`. For backward compatibility, the global `structure` option only applies to folder collections as before.
|
|
120
|
+
- [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure[^21].
|
|
121
|
+
- Removes the [limitations in the List and Object widgets](https://decapcms.org/docs/i18n/#limitations) so that changes made with these widgets will be duplicated between locales as expected when using the `i18n: duplicate` field configuration[^7][^68].
|
|
122
|
+
- You can use the `{{locale}}` template tag in the [`preview_path`](https://decapcms.org/docs/configuration-options/#preview_path) collection option to provide site preview links for each language[^63].
|
|
123
|
+
- You can [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters.
|
|
124
|
+
- You can [localize entry slugs](#localizing-entry-slugs) while linking the localized files[^80], thanks to the support for Hugo’s `translationKey`[^81].
|
|
125
|
+
- When the `clean_accents` option is enabled for [entry slugs](https://decapcms.org/docs/configuration-options/#slug-type), certain characters, such as German umlauts, will be [transliterated](https://www.npmjs.com/package/@sindresorhus/transliterate)[^99].
|
|
126
|
+
- You can embed the locale code in an entry by using `widget: hidden` along with `default: '{{locale}}'`[^101].
|
|
127
|
+
- User interface
|
|
128
|
+
- Eliminates UI confusion: The preview pane can be displayed without toggling i18n in the Content Editor. Both panes are scrollable. There is no condition where both panes are edited in the same language at the same time.
|
|
129
|
+
- You can easily switch between locales while editing by clicking a button instead of a dropdown list. No internal error is thrown when changing the locale[^103].
|
|
130
|
+
- Language labels appear in human-readable display names instead of ISO 639 language codes, which not everyone is familiar with. (For example, it might be difficult to recognize `DE` as German, `NL` as Dutch, or `ZH` as Chinese.)
|
|
131
|
+
- The List widget’s `label` and `label_singular` are not converted to lowercase, which is especially problematic in German, where all nouns are capitalized[^98].
|
|
132
|
+
- Content editing
|
|
133
|
+
- [Integrates DeepL](#using-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
134
|
+
- You can [disable non-default locale content](#disabling-non-default-locale-content)[^15].
|
|
135
|
+
- Boolean, DateTime, List and Number fields in the entry preview are displayed in a localized format.
|
|
136
|
+
- Boolean fields are updated in real time between locales like other widgets to avoid confusion[^35].
|
|
137
|
+
- Relation fields with i18n enabled won’t trigger a change in the content draft status when you start editing an existing entry[^84].
|
|
138
|
+
- Solves problems with Chinese, Japanese and Korean (CJK) [IME](https://en.wikipedia.org/wiki/Input_method) text input in the rich text editor for the Markdown widget[^54].
|
|
139
|
+
- Raises a validation error instead of failing silently if the `single_file` structure is used and a required field is not filled in any of the locales[^55].
|
|
140
|
+
- Fields in non-default locales are validated as expected[^13].
|
|
127
141
|
|
|
128
142
|
### Better collections
|
|
129
143
|
|
|
130
|
-
- Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections[^60].
|
|
131
144
|
- You can choose a [custom icon for each collection](#using-a-custom-icon-for-a-collection)[^3].
|
|
132
145
|
- You can [add dividers to the collection list](#adding-dividers-to-the-collection-list).
|
|
133
146
|
- Assets stored in a [per-collection media folder](#using-a-custom-media-folder-for-a-collection) can be displayed next to the entries.
|
|
134
|
-
- Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
|
|
135
|
-
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
136
|
-
- Single quotes in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
137
147
|
- You can use nested fields (dot notation) in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`[^62].
|
|
138
148
|
- You can use Markdown in collection descriptions[^79]. Bold, italic, strikethrough, code and links are allowed.
|
|
139
149
|
- The New Entry button won’t appear when a developer accidentally sets the `create: true` option on a file collection because it’s useless[^89].
|
|
140
150
|
- The Delete Entry button won’t appear when a developer accidentally sets the `delete: true` option on a file collection because the preconfigured files should not be deleted.
|
|
141
151
|
- A folder collection filter with a boolean value works as expected[^93].
|
|
152
|
+
- Improved entry slugs
|
|
153
|
+
- You can [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
|
|
154
|
+
- Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
|
|
155
|
+
- Single quotes in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
156
|
+
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
142
157
|
|
|
143
158
|
### Better content editing
|
|
144
159
|
|
|
@@ -146,8 +161,8 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
146
161
|
- You can revert changes to all fields or a specific field.
|
|
147
162
|
- You can hide the preview of a specific field with `preview: false`.
|
|
148
163
|
- Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
|
|
149
|
-
- When you click on a field in the
|
|
150
|
-
- The
|
|
164
|
+
- When you click on a field in the preview pane, the corresponding field in the edit pane is highlighted. It will be automatically expanded if collapsed[^41].
|
|
165
|
+
- The preview pane displays all fields, including each title, making it easier to see which fields are populated.
|
|
151
166
|
- Provides better scroll synchronization between the panes when editing or previewing an entry[^92].
|
|
152
167
|
- You can use a full regular expression, including flags, for the widget `pattern` option[^82]. For example, if you want to allow 280 characters or less in a multiline text field, you could write `/^.{0,280}$/s` (but you can now use the `maxlength` option instead).
|
|
153
168
|
- A long validation error message is displayed in full, without being hidden behind the field label[^59].
|
|
@@ -156,7 +171,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
156
171
|
### Better data output
|
|
157
172
|
|
|
158
173
|
- Keys in generated JSON/TOML/YAML content are always sorted by the order of configured fields, making Git commits clean and consistent[^86].
|
|
159
|
-
- For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty.
|
|
174
|
+
- For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty[^45][^46][^44].
|
|
160
175
|
- Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
|
|
161
176
|
- JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file[^11][^69].
|
|
162
177
|
- String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
|
|
@@ -166,6 +181,8 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
166
181
|
- Boolean
|
|
167
182
|
- A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error[^45].
|
|
168
183
|
- An optional Boolean field with no default value is also saved as `false` by default, rather than nothing[^46].
|
|
184
|
+
- Color
|
|
185
|
+
- The preview shows both the RGB(A) hex value and the `rgb()` function notation.
|
|
169
186
|
- DateTime
|
|
170
187
|
- A DateTime field doesn’t trigger a change in the content draft status when you’ve just started editing a new entry[^90].
|
|
171
188
|
- Hidden
|
|
@@ -181,7 +198,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
181
198
|
- Markdown
|
|
182
199
|
- The rich text editor is built with [Lexical](https://github.com/facebook/lexical) instead of [Slate](https://github.com/ianstormtaylor/slate), which solves various problems found in Netlify/Decap CMS, including fatal application crashes[^53][^70][^71][^72][^73].
|
|
183
200
|
- You can set the default editor mode by changing the order of the `modes` option[^58]. If you want to use the plain text editor by default, add `modes: [raw, rich_text]` to the field configuration.
|
|
184
|
-
- Line breaks are rendered as line breaks in the
|
|
201
|
+
- Line breaks are rendered as line breaks in the preview pane according to GitHub Flavored Markdown.
|
|
185
202
|
- Object
|
|
186
203
|
- Sveltia CMS offers two ways to have conditional fields in a collection[^30]:
|
|
187
204
|
- You can use [variable types](https://decapcms.org/docs/variable-type-widgets/) (the `types` option) with the Object widget just like the List widget.
|
|
@@ -190,13 +207,13 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
190
207
|
- Field options are displayed with no additional API requests[^14]. The confusing `options_length` option, which defaults to 20, is therefore ignored[^76].
|
|
191
208
|
- `slug` can be used for `value_field` to show all available options instead of just one in some situations[^91].
|
|
192
209
|
- Template strings with a wildcard like `{{cities.*.name}}` can also be used for `value_field`[^94].
|
|
193
|
-
- `display_fields` is displayed in the
|
|
210
|
+
- `display_fields` is displayed in the preview pane instead of `value_field`.
|
|
194
211
|
- The redundant `search_fields` option is not required in Sveltia CMS, as it defaults to `display_fields` (and `value_field`).
|
|
195
212
|
- Select
|
|
196
213
|
- It’s possible to select an option with value `0`[^56].
|
|
197
|
-
- `label` is displayed in the
|
|
214
|
+
- `label` is displayed in the preview pane instead of `value`.
|
|
198
215
|
- String
|
|
199
|
-
- When a YouTube video URL is entered in a String field, it appears as an embedded video in the
|
|
216
|
+
- When a YouTube video URL is entered in a String field, it appears as an embedded video in the preview pane.
|
|
200
217
|
- Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
|
|
201
218
|
- When a regular URL is entered in a String field, it appears as a link that can be opened in a new browser tab.
|
|
202
219
|
- Supports the `type` option that accepts `url` or `email` as a value, which will validate the value as a URL or email.
|
|
@@ -209,7 +226,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
209
226
|
- A new asset can be uploaded by dragging & dropping it into the dialog[^20].
|
|
210
227
|
- A URL can also be entered in the dialog.
|
|
211
228
|
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More services will be added later.
|
|
212
|
-
- Large images automatically fit in the
|
|
229
|
+
- Large images automatically fit in the preview pane instead of being displayed at their original size, which can easily exceed the width of the pane.
|
|
213
230
|
- List and Object
|
|
214
231
|
- The `summary` is displayed correctly when it refers to a Relation field[^36].
|
|
215
232
|
- Markdown, String and Text
|
|
@@ -217,13 +234,14 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
217
234
|
- Relation and Select
|
|
218
235
|
- If a dropdown list has options with long wrapping labels, they won’t overlap with the next option[^83].
|
|
219
236
|
- When there are 5 or fewer options, the UI switches from a dropdown list to radio buttons (single-select) or checkboxes (multi-select) for faster data entry[^61].
|
|
237
|
+
- This number can be changed with the `dropdown_threshold` option for the `relation` and `select` widgets.
|
|
220
238
|
- String and Text
|
|
221
239
|
- Supports the `minlength` and `maxlength` options, which allow developers to specify the minimum and maximum number of characters required for input without having to write a custom regular expression with the `pattern` option. A character counter is available when one of the options is given, and a user-friendly validation error is displayed if the condition is not met.
|
|
222
240
|
|
|
223
241
|
#### New widgets
|
|
224
242
|
|
|
225
243
|
- Compute
|
|
226
|
-
- The experimental `compute` widget allows to reference the value of other fields in the same collection, similar to the `summary` property for the List and Object widgets. Use the `value` property to define the value template, e.g. `posts-{{fields.slug}}` ([example](https://github.com/sveltia/sveltia-cms/issues/111)).
|
|
244
|
+
- The experimental `compute` widget allows to reference the value of other fields in the same collection, similar to the `summary` property for the List and Object widgets[^104]. Use the `value` property to define the value template, e.g. `posts-{{fields.slug}}` ([example](https://github.com/sveltia/sveltia-cms/issues/111)).
|
|
227
245
|
- UUID
|
|
228
246
|
- In addition to [generating UUIDs for entry slugs](#using-a-random-id-for-an-entry-slug), Sveltia CMS also supports the proposed `uuid` widget with the following properties[^12]:
|
|
229
247
|
- `prefix`: A string to be prepended to the value. Default: an empty string.
|
|
@@ -247,7 +265,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
247
265
|
- View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
|
|
248
266
|
- More features are planned so that you’ll be able to utilize Sveltia CMS as digital asset management (DAM) software.
|
|
249
267
|
- PDF documents are displayed with a thumbnail image in both the Asset Library and the Select File dialog, making it easier to find the file you’re looking for[^38].
|
|
250
|
-
- Assets stored in an entry-relative media folder are automatically deleted when the associated entry is deleted because these assets are not available for other entries[^22].
|
|
268
|
+
- Assets stored in an entry-relative media folder are automatically deleted when the associated entry is deleted because these assets are not available for other entries[^22]. When you’re [working with a local repository](#working-with-a-local-git-repository), the empty enclosing folder is also deleted.
|
|
251
269
|
- Hidden files (dot files) don’t appear in the Asset Library[^47].
|
|
252
270
|
- You can add assets using the Quick Add button in the upper right corner of the application.
|
|
253
271
|
- Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens[^97].
|
|
@@ -294,14 +312,15 @@ Missing other features? Let us know by [filing an issue](https://github.com/svel
|
|
|
294
312
|
|
|
295
313
|
### Before the 1.0 release
|
|
296
314
|
|
|
297
|
-
- Enhanced compatibility with Netlify/Decap CMS
|
|
315
|
+
- Enhanced [compatibility with Netlify/Decap CMS](#compatibility)
|
|
316
|
+
- [Tackling more Netlify/Decap CMS issues](#development-status)
|
|
298
317
|
- Broad automation test coverage (Vitest + Playwright)
|
|
299
318
|
- [Svelte 5](https://svelte.dev/blog/svelte-5-release-candidate) migration
|
|
300
|
-
- Localization
|
|
319
|
+
- Localization with [Fluent](https://projectfluent.org)
|
|
301
320
|
- Documentation
|
|
302
321
|
- Marketing site
|
|
303
|
-
-
|
|
304
|
-
- Starter templates
|
|
322
|
+
- Live demo site
|
|
323
|
+
- Starter templates for popular frameworks
|
|
305
324
|
|
|
306
325
|
### After the 1.0 release
|
|
307
326
|
|
|
@@ -365,17 +384,6 @@ If you’ve chosen to install with npm, updating the package is your responsibil
|
|
|
365
384
|
|
|
366
385
|
## Tips & tricks
|
|
367
386
|
|
|
368
|
-
### Working around configuration loading issue
|
|
369
|
-
|
|
370
|
-
Depending on your server or framework’s configuration, when you access the CMS at `/admin/`, you’ll be redirected to `/admin` with the trailing slash removed. The CMS assumes that your configuration exists in the same directory, which means `/config.yml` is loaded instead of `/admin/config.yml`, resulting in an error saying “The configuration file could not be retrieved.” There are a couple of ways to work around this problem:
|
|
371
|
-
|
|
372
|
-
- Access `/admin/index.html` or `/admin/#/`
|
|
373
|
-
- Rename `/admin/index.html` to `/admin/cms.html`, and access `/admin/cms`
|
|
374
|
-
- [Specify the configuration file path](https://decapcms.org/docs/configuration-options/#configuration-file) with a `<link>` tag in `/admin/index.html`:
|
|
375
|
-
```html
|
|
376
|
-
<link href="/admin/config.yml" type="application/yaml" rel="cms-config-url" />
|
|
377
|
-
```
|
|
378
|
-
|
|
379
387
|
### Providing a JSON configuration file
|
|
380
388
|
|
|
381
389
|
Sveltia CMS supports a configuration file written in the JSON format in addition to the standard YAML format. This allows developers to programmatically generate the CMS configuration to enable bulk or complex collections. To do this, simply add a `<link>` tag to your HTML, just like a [custom YAML config link](https://decapcms.org/docs/configuration-options/#configuration-file), but with the type `application/json`:
|
|
@@ -483,15 +491,17 @@ In Sveltia CMS, those per-collection media folders are displayed prominently for
|
|
|
483
491
|
|
|
484
492
|
### Using DeepL to translate entry fields
|
|
485
493
|
|
|
486
|
-
Sveltia CMS comes with a handy DeepL integration so that you can translate any text field from another locale without leaving the content editor. To enable the high
|
|
494
|
+
Sveltia CMS comes with a handy DeepL integration so that you can translate any text field from another locale without leaving the content editor. To enable the high quality, AI-powered, quick translation feature:
|
|
487
495
|
|
|
488
496
|
1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
|
|
489
497
|
1. Sign up for [DeepL API](https://www.deepl.com/pro-api/) and copy your Authentication Key from DeepL’s Account page.
|
|
490
498
|
1. Open an entry in Sveltia CMS.
|
|
491
|
-
1. Click on the Translation button on the header or each field, right next to the 3-dot menu.
|
|
499
|
+
1. Click on the Translation button on the pane header or each field, right next to the 3-dot menu.
|
|
492
500
|
1. Paste your key when prompted.
|
|
493
501
|
1. The field(s) will be automatically translated.
|
|
494
502
|
|
|
503
|
+
Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
|
|
504
|
+
|
|
495
505
|
If you have upgraded to DeepL API Pro, provide your new Authentication Key:
|
|
496
506
|
|
|
497
507
|
1. Click the Account button in the upper right corner, then click Settings.
|
|
@@ -499,6 +509,8 @@ If you have upgraded to DeepL API Pro, provide your new Authentication Key:
|
|
|
499
509
|
1. Paste your key to the DeepL API Authentication Key field.
|
|
500
510
|
1. Close the Settings dialog.
|
|
501
511
|
|
|
512
|
+
More translation service providers will be added in the future.
|
|
513
|
+
|
|
502
514
|
### Localizing entry slugs
|
|
503
515
|
|
|
504
516
|
In Sveltia CMS, it’s possible to localize entry slugs (filenames) if the i18n structure is `multiple_files` or `multiple_folders`. All you need is the `localize` filter for `slug` template tags:
|
|
@@ -540,7 +552,7 @@ With this configuration, an entry is saved with localized filenames, while the d
|
|
|
540
552
|
translationKey: my-trip-to-new-york
|
|
541
553
|
```
|
|
542
554
|
|
|
543
|
-
You can customize the property name and value for a different framework or i18n library by adding the `canonical_slug` option to your top-level or per-collection `i18n` configuration. The example below is for [
|
|
555
|
+
You can customize the property name and value for a different framework or i18n library by adding the `canonical_slug` option to your top-level or per-collection `i18n` configuration. The example below is for [@astrolicious/i18n](https://github.com/astrolicious/i18n), which requires a locale prefix in the value ([discussion](https://github.com/sveltia/sveltia-cms/issues/137)):
|
|
544
556
|
|
|
545
557
|
```yaml
|
|
546
558
|
i18n:
|
|
@@ -549,6 +561,14 @@ i18n:
|
|
|
549
561
|
value: 'en/{{slug}}' # default: {{slug}}
|
|
550
562
|
```
|
|
551
563
|
|
|
564
|
+
Or, for [Jekyll](https://migueldavid.eu/how-to-make-jekyll-multilingual-c13e74c18f1c), you may want to use the `ref` property:
|
|
565
|
+
|
|
566
|
+
```yaml
|
|
567
|
+
i18n:
|
|
568
|
+
canonical_slug:
|
|
569
|
+
key: ref
|
|
570
|
+
```
|
|
571
|
+
|
|
552
572
|
### Disabling non-default locale content
|
|
553
573
|
|
|
554
574
|
You can now disable output of content in selected non-default locales by adding the `save_all_locales` property to the top-level or per-collection `i18n` configuration. Then you’ll find “Disable (locale name)” in the three-dot menu in the top right corner of the content editor. This is useful if the translation isn’t ready yet, but you want to publish the default locale content first.
|
|
@@ -747,7 +767,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
747
767
|
[^6]: Netlify/Decap CMS [#3240](https://github.com/decaporg/decap-cms/issues/3240)
|
|
748
768
|
[^7]: Netlify/Decap CMS [#4386](https://github.com/decaporg/decap-cms/issues/4386)
|
|
749
769
|
[^8]: Netlify/Decap CMS [#2579](https://github.com/decaporg/decap-cms/issues/2579)
|
|
750
|
-
[^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505), [#4211](https://github.com/decaporg/decap-cms/issues/4211)
|
|
770
|
+
[^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505), [#4211](https://github.com/decaporg/decap-cms/issues/4211), [#5439](https://github.com/decaporg/decap-cms/issues/5439)
|
|
751
771
|
[^10]: Netlify/Decap CMS [#341](https://github.com/decaporg/decap-cms/issues/341), [#1167](https://github.com/decaporg/decap-cms/issues/1167)
|
|
752
772
|
[^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382)
|
|
753
773
|
[^12]: Netlify/Decap CMS [#1975](https://github.com/decaporg/decap-cms/issues/1975), [#3712](https://github.com/decaporg/decap-cms/issues/3712)
|
|
@@ -760,11 +780,11 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
760
780
|
[^19]: Netlify/Decap CMS [#5910](https://github.com/decaporg/decap-cms/issues/5910)
|
|
761
781
|
[^20]: Netlify/Decap CMS [#4563](https://github.com/decaporg/decap-cms/issues/4563)
|
|
762
782
|
[^21]: Netlify/Decap CMS [#4781](https://github.com/decaporg/decap-cms/issues/4781)
|
|
763
|
-
[^22]: Netlify/Decap CMS [#6642](https://github.com/decaporg/decap-cms/issues/6642)
|
|
783
|
+
[^22]: Netlify/Decap CMS [#3615](https://github.com/decaporg/decap-cms/issues/3615), [#4069](https://github.com/decaporg/decap-cms/issues/4069), [#5097](https://github.com/decaporg/decap-cms/issues/5097), [#6642](https://github.com/decaporg/decap-cms/issues/6642)
|
|
764
784
|
[^23]: Netlify/Decap CMS [#2](https://github.com/decaporg/decap-cms/issues/2)
|
|
765
785
|
[^24]: Netlify/Decap CMS [#6831](https://github.com/decaporg/decap-cms/issues/6831)
|
|
766
786
|
[^25]: Netlify/Decap CMS [#526](https://github.com/decaporg/decap-cms/issues/526), [#6987](https://github.com/decaporg/decap-cms/issues/6987)
|
|
767
|
-
[^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285)
|
|
787
|
+
[^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285), [#7030](https://github.com/decaporg/decap-cms/issues/7030), [#7067](https://github.com/decaporg/decap-cms/issues/7067)
|
|
768
788
|
[^27]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/5617)
|
|
769
789
|
[^28]: Netlify/Decap CMS [#2677](https://github.com/decaporg/decap-cms/pull/2677), [#6836](https://github.com/decaporg/decap-cms/pull/6836)
|
|
770
790
|
[^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
|
|
@@ -792,7 +812,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
792
812
|
[^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)
|
|
793
813
|
[^52]: Netlify/Decap CMS [#7147](https://github.com/decaporg/decap-cms/issues/7147)
|
|
794
814
|
[^53]: Netlify/Decap CMS [#512](https://github.com/decaporg/decap-cms/issues/512), [#5673](https://github.com/decaporg/decap-cms/issues/5673), [#6707](https://github.com/decaporg/decap-cms/issues/6707)
|
|
795
|
-
[^54]: Netlify/Decap CMS [#1347](https://github.com/decaporg/decap-cms/issues/1347), [#4629](https://github.com/decaporg/decap-cms/issues/4629), [#6287](https://github.com/decaporg/decap-cms/issues/6287) — Decap 3.0 updated the Slate editor in an attempt to fix the problems, but the IME issues remain unresolved when using a mobile/tablet browser.
|
|
815
|
+
[^54]: Netlify/Decap CMS [#1347](https://github.com/decaporg/decap-cms/issues/1347), [#4629](https://github.com/decaporg/decap-cms/issues/4629), [#6287](https://github.com/decaporg/decap-cms/issues/6287), [#6826](https://github.com/decaporg/decap-cms/issues/6826) — Decap 3.0 updated the Slate editor in an attempt to fix the problems, but the IME issues remain unresolved when using a mobile/tablet browser.
|
|
796
816
|
[^55]: Netlify/Decap CMS [#4480](https://github.com/decaporg/decap-cms/issues/4480), [#6353](https://github.com/decaporg/decap-cms/issues/6353)
|
|
797
817
|
[^56]: Netlify/Decap CMS [#6515](https://github.com/decaporg/decap-cms/issues/6515)
|
|
798
818
|
[^57]: Netlify/Decap CMS [#328](https://github.com/decaporg/decap-cms/issues/328)
|
|
@@ -809,7 +829,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
809
829
|
[^68]: Netlify/Decap CMS [#6978](https://github.com/decaporg/decap-cms/issues/6978)
|
|
810
830
|
[^69]: Netlify/Decap CMS [#6994](https://github.com/decaporg/decap-cms/issues/6994)
|
|
811
831
|
[^70]: Netlify/Decap CMS [#6482](https://github.com/decaporg/decap-cms/issues/6482)
|
|
812
|
-
[^71]: Netlify/Decap CMS [#6999](https://github.com/decaporg/decap-cms/issues/6999), [#7152](https://github.com/decaporg/decap-cms/issues/7152)
|
|
832
|
+
[^71]: Netlify/Decap CMS [#6999](https://github.com/decaporg/decap-cms/issues/6999), [#7000](https://github.com/decaporg/decap-cms/issues/7000), [#7001](https://github.com/decaporg/decap-cms/issues/7001), [#7152](https://github.com/decaporg/decap-cms/issues/7152)
|
|
813
833
|
[^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
|
|
814
834
|
[^73]: Netlify/Decap CMS [#7123](https://github.com/decaporg/decap-cms/issues/7123)
|
|
815
835
|
[^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
|
|
@@ -841,4 +861,10 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
841
861
|
[^100]: Netlify/Decap CMS [#4147](https://github.com/decaporg/decap-cms/issues/4147)
|
|
842
862
|
[^101]: Netlify/Decap CMS [#5969](https://github.com/decaporg/decap-cms/issues/5969)
|
|
843
863
|
[^102]: Netlify/Decap CMS [#1270](https://github.com/decaporg/decap-cms/issues/1270)
|
|
864
|
+
[^103]: Netlify/Decap CMS [#6307](https://github.com/decaporg/decap-cms/issues/6307)
|
|
865
|
+
[^104]: Netlify/Decap CMS [#6819](https://github.com/decaporg/decap-cms/issues/6819)
|
|
866
|
+
[^105]: Netlify/Decap CMS [#5701](https://github.com/decaporg/decap-cms/issues/5701)
|
|
867
|
+
[^106]: Netlify/Decap CMS [#2822](https://github.com/decaporg/decap-cms/issues/2822)
|
|
868
|
+
[^107]: Netlify/Decap CMS [#332](https://github.com/decaporg/decap-cms/issues/332), [#683](https://github.com/decaporg/decap-cms/issues/683), [#999](https://github.com/decaporg/decap-cms/issues/999), [#1456](https://github.com/decaporg/decap-cms/issues/1456), [#4175](https://github.com/decaporg/decap-cms/issues/4175), [#5688](https://github.com/decaporg/decap-cms/issues/5688), [#6828](https://github.com/decaporg/decap-cms/issues/6828), [#6862](https://github.com/decaporg/decap-cms/issues/6862), [#7023](https://github.com/decaporg/decap-cms/issues/7023)
|
|
869
|
+
[^108]: Netlify/Decap CMS [#6829](https://github.com/decaporg/decap-cms/issues/6829)
|
|
844
870
|
[^999]: Netlify/Decap CMS [#5656](https://github.com/decaporg/decap-cms/issues/5656), [#5837](https://github.com/decaporg/decap-cms/issues/5837), [#5972](https://github.com/decaporg/decap-cms/issues/5972), [#6476](https://github.com/decaporg/decap-cms/issues/6476), [#6516](https://github.com/decaporg/decap-cms/issues/6516), [#6930](https://github.com/decaporg/decap-cms/issues/6930), [#6965](https://github.com/decaporg/decap-cms/issues/6965), [#7080](https://github.com/decaporg/decap-cms/issues/7080), [#7105](https://github.com/decaporg/decap-cms/issues/7105), [#7106](https://github.com/decaporg/decap-cms/issues/7106), [#7119](https://github.com/decaporg/decap-cms/issues/7119), [#7176](https://github.com/decaporg/decap-cms/issues/7176), [#7194](https://github.com/decaporg/decap-cms/issues/7194) — These `removeChild` crashes are common in React apps and seem to be caused by a [browser extension](https://github.com/facebook/react/issues/17256) or [Google Translate](https://github.com/facebook/react/issues/11538).
|