@sveltia/cms 0.40.2 → 0.40.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 +82 -34
- package/dist/sveltia-cms.js +246 -246
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +241 -241
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
25
25
|
- [Better accessibility](#better-accessibility)
|
|
26
26
|
- [Better security](#better-security)
|
|
27
27
|
- [Better configuration](#better-configuration)
|
|
28
|
+
- [Better localization](#better-localization)
|
|
28
29
|
- [Better backend support](#better-backend-support)
|
|
29
30
|
- [Better i18n support](#better-i18n-support)
|
|
30
31
|
- [Better collections](#better-collections)
|
|
@@ -33,6 +34,7 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
33
34
|
- [Better widgets](#better-widgets)
|
|
34
35
|
- [New widgets](#new-widgets)
|
|
35
36
|
- [Better asset management](#better-asset-management)
|
|
37
|
+
- [Better customization](#better-customization)
|
|
36
38
|
- [Compatibility](#compatibility)
|
|
37
39
|
- [Features not to be implemented](#features-not-to-be-implemented)
|
|
38
40
|
- [Current limitations](#current-limitations)
|
|
@@ -40,10 +42,10 @@ Sveltia CMS is a Git-based lightweight headless CMS under active development as
|
|
|
40
42
|
- [New users](#new-users)
|
|
41
43
|
- [Migration](#migration)
|
|
42
44
|
- [Migrating from Git Gateway backend](#migrating-from-git-gateway-backend)
|
|
43
|
-
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
44
45
|
- [Installing with npm](#installing-with-npm)
|
|
45
46
|
- [Updates](#updates)
|
|
46
47
|
- [Tips \& tricks](#tips--tricks)
|
|
48
|
+
- [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
|
|
47
49
|
- [Providing a JSON configuration file](#providing-a-json-configuration-file)
|
|
48
50
|
- [Working around authentication error](#working-around-authentication-error)
|
|
49
51
|
- [Working with a local Git repository](#working-with-a-local-git-repository)
|
|
@@ -81,7 +83,7 @@ Due to its unfortunate abandonment, Netlify CMS spawned 3 successors:
|
|
|
81
83
|
- **Sveltia CMS**: a total reboot, started in November 2022, first appeared on GitHub in March 2023
|
|
82
84
|
- [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version, owned by a Netlify agency partner, [announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as the official successor
|
|
83
85
|
|
|
84
|
-
Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt and miscellaneous bugs of Netlify CMS, which was launched back in 2016. We are confident that our decision to rebuild the application from scratch was the right one, as proven by the hundreds of improvements we have already made.
|
|
86
|
+
Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt and miscellaneous bugs of Netlify CMS, which was launched back in 2016. We are confident that our decision to rebuild the application from scratch was the right one, as proven by the [hundreds of improvements](#differentiators) we have already made.
|
|
85
87
|
|
|
86
88
|
While Sveltia CMS is specifically designed to replace legacy Netlify CMS instances, it also aims to serve as a substitute for the other products. (Note: While we are closely following the development of Decap CMS, compatibility with Static CMS will be worked on after the release of Sveltia CMS 1.0)
|
|
87
89
|
|
|
@@ -99,9 +101,9 @@ Sveltia CMS is **still in beta**, so please be careful when trying it out.
|
|
|
99
101
|
|
|
100
102
|
While we fix reported bugs as quickly as possible, usually within 24 hours, our 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:
|
|
101
103
|
|
|
102
|
-
- Ensuring substantial [compatibility with
|
|
104
|
+
- Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
|
|
103
105
|
- Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
|
|
104
|
-
- So far,
|
|
106
|
+
- So far, 130+ of them (or 235+ including duplicates) have been effectively solved in Sveltia CMS
|
|
105
107
|
- Target: 150 issues by GA, 250 (or all the relevant and fixable issues) in a future release
|
|
106
108
|
- Note: issues include both feature requests and bug reports
|
|
107
109
|
- [Let us know](https://github.com/sveltia/sveltia-cms/issues/new) if you have any specific issues you’d like to see solved!
|
|
@@ -110,7 +112,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
|
|
|
110
112
|
|
|
111
113
|
Sveltia CMS **version 1.0 is expected to ship by the end of 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates. See also our [roadmap](#roadmap).
|
|
112
114
|
|
|
113
|
-
<br>
|
|
114
116
|
|
|
115
117
|
## Differentiators
|
|
116
118
|
|
|
@@ -124,7 +126,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
124
126
|
- Comes with touch device support, such as larger buttons for easier tapping. While the UI is not yet optimized for small screens, it should work well with large tablets like iPad Pro or Pixel Tablet. Mobile support and other optimizations such as swipe navigation are planned after the 1.0 release.
|
|
125
127
|
- Made with Svelte, not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common fatal application crashes[^113][^129]. Best of all, Svelte offers unmatched performance!
|
|
126
128
|
- The Help menu provides all links to useful resources, including release notes, feedback and support.
|
|
127
|
-
- Users can
|
|
129
|
+
- Users can personalize the application with various settings.
|
|
128
130
|
- Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available[^31]. Then update to the latest version with a single click[^66].
|
|
129
131
|
|
|
130
132
|
### Better performance
|
|
@@ -151,7 +153,7 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
151
153
|
- Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
|
|
152
154
|
- The editor closes automatically when an entry is saved. This behaviour can be changed in Settings.
|
|
153
155
|
- Uploading files can be done with drag and drop[^20].
|
|
154
|
-
- You can upload multiple
|
|
156
|
+
- You can upload multiple files at once to the Asset Library[^5].
|
|
155
157
|
- You can delete multiple entries and assets at once.
|
|
156
158
|
- Some [keyboard shortcuts](#using-keyboard-shortcuts) are available for faster editing.
|
|
157
159
|
|
|
@@ -179,7 +181,13 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
179
181
|
|
|
180
182
|
- 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].
|
|
181
183
|
- Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections[^60].
|
|
182
|
-
|
|
184
|
+
|
|
185
|
+
### Better localization
|
|
186
|
+
|
|
187
|
+
- The application UI locale is automatically selected based on the preferred language set with the browser[^132]. The `locale` configuration option is ignored, and `CMS.registerLocale()` is not required.
|
|
188
|
+
- 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].
|
|
189
|
+
- Long menu item labels, especially in non-English locales, don’t overflow the dropdown container[^117].
|
|
190
|
+
- We’ll soon be migrating from [svelte-i18n](https://github.com/kaisermann/svelte-i18n) to the [Fluent localization system](https://projectfluent.org/) to better handle singular/plural forms and even more complex grammars.
|
|
183
191
|
|
|
184
192
|
### Better backend support
|
|
185
193
|
|
|
@@ -199,9 +207,10 @@ We are working hard to create a **significantly better alternative to Netlify CM
|
|
|
199
207
|
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.
|
|
200
208
|
|
|
201
209
|
- Configuration
|
|
202
|
-
-
|
|
210
|
+
- The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
|
|
211
|
+
- File collections support multiple files/folders i18n structures[^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.
|
|
212
|
+
- You can use the `i18n: duplicate` field configuration with the List and Object widgets so that changes made with these widgets will be duplicated between locales as expected[^7][^68].
|
|
203
213
|
- [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].
|
|
204
|
-
- 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].
|
|
205
214
|
- 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].
|
|
206
215
|
- 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.
|
|
207
216
|
- You can [localize entry slugs](#localizing-entry-slugs) while linking the localized files[^80], thanks to the support for Hugo’s `translationKey`[^81].
|
|
@@ -210,9 +219,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
210
219
|
- User interface
|
|
211
220
|
- 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.
|
|
212
221
|
- 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].
|
|
213
|
-
- Language labels appear in human-readable display names instead of ISO 639 language codes
|
|
214
|
-
- 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].
|
|
215
|
-
- Long menu item labels, especially in non-English locales, don’t overflow the dropdown container[^117].
|
|
222
|
+
- Language labels appear in human-readable display names instead of ISO 639 language codes because it may be difficult for non-technical users to recognize `DE` as German, `NL` as Dutch, or `ZH` as Chinese.
|
|
216
223
|
- Content editing
|
|
217
224
|
- [Integrates DeepL](#using-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click. More translation services will be added in the future.
|
|
218
225
|
- You can [disable non-default locale content](#disabling-non-default-locale-content)[^15].
|
|
@@ -233,15 +240,18 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
233
240
|
- You can use Markdown in the `description` collection option[^79]. Bold, italic, strikethrough, code and links are allowed.
|
|
234
241
|
- Entry slugs
|
|
235
242
|
- You can [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
|
|
243
|
+
- Slug generation is fail-safe: If a slug cannot be determined from entry content, part of a random UUID is used instead of throwing an error or filling in with arbitrary string field values[^133].
|
|
236
244
|
- Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
|
|
237
|
-
- Single quotes in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
238
|
-
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
|
|
245
|
+
- Single quotes (apostrophes) in a slug will be replaced with `sanitize_replacement` (default: hyphen) rather than being removed[^52].
|
|
246
|
+
- You can set the maximum number of characters for an entry slug with the new `slug_length` collection option to avoid deployment errors with Netlify or other platforms[^25].
|
|
247
|
+
- Setting the collection `path` doesn’t affect the entry slugs used for the Relation widget[^137].
|
|
239
248
|
- Entry listing
|
|
240
249
|
- The collection list displays the number of items in each collection.
|
|
241
250
|
- A folder collection filter with a boolean value works as expected[^93].
|
|
242
251
|
- Hugo’s special `_index.md` files are ignored in folder collections unless the `path` option is configured to end with `_index` and the `extension` is `md`[^120]. You can still manage these files as part of a file collection if necessary.
|
|
243
252
|
- If there was an error while parsing an entry file, such as duplicate front matter keys, it won’t show up as a blank entry, and a clear error message will be displayed in the browser console[^121].
|
|
244
253
|
- Sorting entries by a DateTime field works as expected[^110].
|
|
254
|
+
- Whenever you’ve updated an entry’s title (or any other field) that appears as the collection’s `summary`, the entry list displays the updated title.
|
|
245
255
|
- Assets stored in a [per-collection media folder](#using-a-custom-media-folder-for-a-collection) can be displayed next to the entries.
|
|
246
256
|
- 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].
|
|
247
257
|
- 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.
|
|
@@ -249,17 +259,19 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
249
259
|
|
|
250
260
|
### Better content editing
|
|
251
261
|
|
|
252
|
-
- Required fields, not optional fields, are
|
|
262
|
+
- Required fields, not optional fields, are marked for efficient data entry.
|
|
253
263
|
- You can revert changes to all fields or a specific field.
|
|
254
264
|
- If you revert changes and there are no unsaved changes, the Save button is disabled as expected[^118].
|
|
255
265
|
- You can hide the preview of a specific field with `preview: false`[^126].
|
|
256
266
|
- Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
|
|
267
|
+
- The preview pane won’t cause a scrolling issue[^136].
|
|
257
268
|
- 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].
|
|
258
269
|
- The preview pane displays all fields, including each title, making it easier to see which fields are populated.
|
|
259
270
|
- Provides better scroll synchronization between the panes when editing or previewing an entry[^92].
|
|
260
|
-
- 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)
|
|
271
|
+
- 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.)
|
|
261
272
|
- A long validation error message is displayed in full, without being hidden behind the field label[^59].
|
|
262
273
|
- Any links to other entries will work as expected, with the Content Editor being updated for the other[^100].
|
|
274
|
+
- In the Boolean and Select widgets, you don’t have to update a value twice to re-enable the Save button after saving an entry[^139].
|
|
263
275
|
|
|
264
276
|
### Better data output
|
|
265
277
|
|
|
@@ -291,7 +303,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
291
303
|
- You can enter spaces in a simple text-based List field[^50].
|
|
292
304
|
- You can preview variable types without having to register a preview template[^42].
|
|
293
305
|
- Markdown
|
|
294
|
-
- The rich text editor is built with [Lexical](https://lexical.dev/), which solves various issues with a [Slate](https://github.com/ianstormtaylor/slate)-based editor in Netlify/Decap CMS, including fatal application crashes[^71][^72][^73][^111], lost formatting when pasting[^124], backslash injections[^53], dropdown visibility[^70], and text input difficulties with IME[^54].
|
|
306
|
+
- The rich text editor is built with the well-maintained [Lexical](https://lexical.dev/) framework, which solves various issues with a [Slate](https://github.com/ianstormtaylor/slate)-based editor in Netlify/Decap CMS, including fatal application crashes[^71][^72][^73][^111], lost formatting when pasting[^124], backslash injections[^53], dropdown visibility[^70], and text input difficulties with IME[^54].
|
|
295
307
|
- 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.
|
|
296
308
|
- Line breaks are rendered as line breaks in the preview pane according to GitHub Flavored Markdown.
|
|
297
309
|
- Object
|
|
@@ -304,6 +316,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
304
316
|
- Template strings with a wildcard like `{{cities.*.name}}` can also be used for `value_field`[^94].
|
|
305
317
|
- `display_fields` is displayed in the preview pane instead of `value_field`.
|
|
306
318
|
- The redundant `search_fields` option is not required in Sveltia CMS, as it defaults to `display_fields` (and `value_field`).
|
|
319
|
+
- A new referenced item created in another collection is immediately available in the options[^138].
|
|
307
320
|
- Select
|
|
308
321
|
- It’s possible to select an option with value `0`[^56].
|
|
309
322
|
- `label` is displayed in the preview pane instead of `value`.
|
|
@@ -323,6 +336,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
323
336
|
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More stock photo providers will be added in the future.
|
|
324
337
|
- You can also simply drag and drop a file onto a File/Image field to attach it without having to open the Select File dialog.
|
|
325
338
|
- 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.
|
|
339
|
+
- If the `public_folder` contains `{{slug}}` and you’ve edited an entry slug field (e.g. title) after uploading an asset, the updated slug will be used in the saved asset path[^140]. Other dynamic template tags such as `{{filename}}` will also be populated as expected[^141].
|
|
326
340
|
- List and Object
|
|
327
341
|
- The `summary` is displayed correctly when it refers to a Relation field[^36] or a simple List field.
|
|
328
342
|
- Markdown, String and Text
|
|
@@ -359,12 +373,17 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
359
373
|
- Sort or filter assets by name or file type.
|
|
360
374
|
- View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
|
|
361
375
|
- 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].
|
|
362
|
-
- 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.
|
|
376
|
+
- Assets stored in an entry-relative media folder are displayed in the Asset Library[^142]. These assets 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.
|
|
363
377
|
- Hidden files (dot files) don’t appear in the Asset Library[^47].
|
|
364
378
|
- You can add assets using the Quick Add button in the upper right corner of the application.
|
|
365
379
|
- Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens[^97].
|
|
366
380
|
- No fatal application crash when uploading assets[^112].
|
|
367
381
|
|
|
382
|
+
### Better customization
|
|
383
|
+
|
|
384
|
+
- The application renders within the dimensions of a [custom mount element](https://decapcms.org/docs/custom-mounting/), if exists[^109].
|
|
385
|
+
- A custom logo defined with the `logo_url` property is displayed on the global application header and the browser tab (favicon)[^134]. A smaller logo is also correctly positioned on the authentication page[^135].
|
|
386
|
+
|
|
368
387
|
## Compatibility
|
|
369
388
|
|
|
370
389
|
We are trying to make Sveltia CMS compatible with Netlify/Decap CMS where possible, so that more users can seamlessly switch to our modern alternative. It’s 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](#migration).
|
|
@@ -376,6 +395,7 @@ However, some features are still missing or will not be added due to deprecation
|
|
|
376
395
|
- **The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported** for performance reasons. We may implement a high-performance Git Gateway alternative in the future. We may also support the other platforms if/when their APIs improve to allow the CMS to fetch multiple files at once.
|
|
377
396
|
- **The Netlify Identity widget will not be supported**, as it’s not useful without Git Gateway. We may be able to support it in the future if/when a Git Gateway alternative is created.
|
|
378
397
|
- The deprecated client-side implicit grant for the GitLab backend will not be supported, as it has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
|
|
398
|
+
- `netlify-cms-proxy-server` and `decap-server` will not be supported, as we have made it possible to [work with a local repository](#working-with-a-local-git-repository) without a proxy server.
|
|
379
399
|
- The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
|
|
380
400
|
- The deprecated Date widget will not be supported, as it has already been removed from Decap CMS 3.0. Use the DateTime widget instead.
|
|
381
401
|
- Remark plugins will not be supported, as they are not compatible with our Lexical-based rich text editor.
|
|
@@ -459,9 +479,7 @@ Once you have migrated from the Git Gateway and Netlify Identity combo, you can
|
|
|
459
479
|
-<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
|
460
480
|
```
|
|
461
481
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](https://pages.cloudflare.com/) or [GitHub Pages](https://pages.github.com/). But moving away from Netlify means you can no longer sign in with GitHub or GitLab via Netlify. Instead, you can use [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth), which can be easily deployed to Cloudflare Workers, or [any other 3rd party client](https://decapcms.org/docs/external-oauth-clients/) made for Netlify/Decap CMS.
|
|
482
|
+
If you want to stay with Netlify Identity, unfortunately you can’t migrate to Sveltia CMS right now. We plan to develop a high-performance Git Gateway alternative with Netlify Identity support in the future.
|
|
465
483
|
|
|
466
484
|
### Installing with npm
|
|
467
485
|
|
|
@@ -475,6 +493,10 @@ If you’ve chosen to install with npm, updating the package is your responsibil
|
|
|
475
493
|
|
|
476
494
|
## Tips & tricks
|
|
477
495
|
|
|
496
|
+
### Moving your site from Netlify to another hosting service
|
|
497
|
+
|
|
498
|
+
You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](https://pages.cloudflare.com/) or [GitHub Pages](https://pages.github.com/). But moving away from Netlify means you can no longer sign in with GitHub or GitLab via Netlify. Instead, you can use [our own OAuth client](https://github.com/sveltia/sveltia-cms-auth), which can be easily deployed to Cloudflare Workers, or [any other 3rd party client](https://decapcms.org/docs/external-oauth-clients/) made for Netlify/Decap CMS.
|
|
499
|
+
|
|
478
500
|
### Providing a JSON configuration file
|
|
479
501
|
|
|
480
502
|
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`:
|
|
@@ -499,9 +521,11 @@ Basically there are only two differences: you don’t need to run the proxy serv
|
|
|
499
521
|
- Please note that the Git Gateway backend mentioned in the Netlify/Decap CMS [local Git repository document](https://decapcms.org/docs/working-with-a-local-git-repository/) is not supported in Sveltia CMS, so `name: git-gateway` won’t work. You’ll need either `name: github` or `name: gitlab` along with the `repo` definition. If you haven’t determined your repository name yet, just use a random one.
|
|
500
522
|
- You can remove `local_backend` from your configuration, as it will be ignored by Sveltia CMS.
|
|
501
523
|
1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
|
|
502
|
-
1.
|
|
503
|
-
-
|
|
524
|
+
1. Open `http://localhost:[port]/admin/index.html` with Chrome or Edge.
|
|
525
|
+
- The port number varies by framework. Check the output from the previous step.
|
|
504
526
|
- The `127.0.0.1` address can also be used instead of `localhost`.
|
|
527
|
+
- If your CMS instance is not located under `/admin/`, use the appropriate path.
|
|
528
|
+
- Other Chromium-based browsers may also work. Brave user? [See below](#enabling-local-development-in-brave).
|
|
505
529
|
1. Click “Work with Local Repository” and select the project’s root directory once prompted.
|
|
506
530
|
- If you get an error saying “not a repository root directory”, make sure you’ve turned the folder into a repository with either a CUI ([`git init`](https://github.com/git-guides/git-init)) or GUI, and the hidden `.git` folder exists.
|
|
507
531
|
- If you’re using Windows Subsystem for Linux (WSL), you may get an error saying “Can’t open this folder because it contains system files.” This is due to a limitation in the browser, and you can try some workarounds mentioned in [this issue](https://github.com/coder/code-server/issues/4646) and [this thread](https://github.com/sveltia/sveltia-cms/discussions/101).
|
|
@@ -510,7 +534,7 @@ Basically there are only two differences: you don’t need to run the proxy serv
|
|
|
510
534
|
1. Open the dev site at `http://localhost:[port]/` to check the rendered pages.
|
|
511
535
|
1. Commit and push the changes if satisfied, or discard them if you’re just testing.
|
|
512
536
|
|
|
513
|
-
Keep in mind that the local repository support doesn’t perform any Git operations. You’ll have to manually fetch, pull, commit and push all changes using a Git client. In the near future, we’ll figure out if there’s a way to do this in a browser (because `netlify-cms-proxy-server` actually has undocumented `git` mode that allows developers to create commits to a local repository)
|
|
537
|
+
Keep in mind that the local repository support doesn’t perform any Git operations. You’ll have to manually fetch, pull, commit and push all changes using a Git client. In the near future, we’ll figure out if there’s a way to do this in a browser (because `netlify-cms-proxy-server` actually has undocumented `git` mode that allows developers to create commits to a local repository[^131].)
|
|
514
538
|
|
|
515
539
|
Also, at this point, you have to reload the CMS to see the latest content after retrieving remote updates. This manual work will be unnecessary once the proposed `FileSystemObserver` API, which is being [implemented in Chromium](https://issues.chromium.org/issues/40105284) behind a flag, becomes available.
|
|
516
540
|
|
|
@@ -903,11 +927,11 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
903
927
|
|
|
904
928
|
[^13]: Netlify/Decap CMS [#5112](https://github.com/decaporg/decap-cms/issues/5112), [#5653](https://github.com/decaporg/decap-cms/issues/5653)
|
|
905
929
|
|
|
906
|
-
[^14]: Netlify/Decap CMS [#4635](https://github.com/decaporg/decap-cms/issues/4635), [#5920](https://github.com/decaporg/decap-cms/issues/5920), [#6410](https://github.com/decaporg/decap-cms/issues/6410), [#6924](https://github.com/decaporg/decap-cms/issues/6924)
|
|
930
|
+
[^14]: Netlify/Decap CMS [#4635](https://github.com/decaporg/decap-cms/issues/4635), [#5920](https://github.com/decaporg/decap-cms/issues/5920), [#6410](https://github.com/decaporg/decap-cms/issues/6410), [#6827](https://github.com/decaporg/decap-cms/issues/6827), [#6924](https://github.com/decaporg/decap-cms/issues/6924)
|
|
907
931
|
|
|
908
932
|
[^15]: Netlify/Decap CMS [#6932](https://github.com/decaporg/decap-cms/issues/6932)
|
|
909
933
|
|
|
910
|
-
[^16]: Netlify/Decap CMS [#2103](https://github.com/decaporg/decap-cms/issues/2103)
|
|
934
|
+
[^16]: Netlify/Decap CMS [#2103](https://github.com/decaporg/decap-cms/issues/2103), [#7302](https://github.com/decaporg/decap-cms/issues/7302)
|
|
911
935
|
|
|
912
936
|
[^17]: Netlify/Decap CMS [#1333](https://github.com/decaporg/decap-cms/issues/1333)
|
|
913
937
|
|
|
@@ -935,7 +959,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
935
959
|
|
|
936
960
|
[^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
|
|
937
961
|
|
|
938
|
-
[^30]: Netlify/Decap CMS [#565](https://github.com/decaporg/decap-cms/issues/565)
|
|
962
|
+
[^30]: Netlify/Decap CMS [#565](https://github.com/decaporg/decap-cms/issues/565), [#6733](https://github.com/decaporg/decap-cms/issues/6733)
|
|
939
963
|
|
|
940
964
|
[^31]: Netlify/Decap CMS [#1045](https://github.com/decaporg/decap-cms/issues/1045)
|
|
941
965
|
|
|
@@ -943,7 +967,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
943
967
|
|
|
944
968
|
[^33]: Netlify/Decap CMS [#6513](https://github.com/decaporg/decap-cms/issues/6513), [#7295](https://github.com/decaporg/decap-cms/issues/7295)
|
|
945
969
|
|
|
946
|
-
[^34]: Netlify/Decap CMS [#2138](https://github.com/decaporg/decap-cms/issues/2138)
|
|
970
|
+
[^34]: Netlify/Decap CMS [#2138](https://github.com/decaporg/decap-cms/issues/2138), [#5932](https://github.com/decaporg/decap-cms/issues/5932)
|
|
947
971
|
|
|
948
972
|
[^35]: Netlify/Decap CMS [#7086](https://github.com/decaporg/decap-cms/issues/7086)
|
|
949
973
|
|
|
@@ -971,7 +995,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
971
995
|
|
|
972
996
|
[^47]: Netlify/Decap CMS [#2370](https://github.com/decaporg/decap-cms/issues/2370), [#5596](https://github.com/decaporg/decap-cms/issues/5596)
|
|
973
997
|
|
|
974
|
-
[^48]: Netlify/Decap CMS [#5569](https://github.com/decaporg/decap-cms/issues/5569)
|
|
998
|
+
[^48]: Netlify/Decap CMS [#5569](https://github.com/decaporg/decap-cms/issues/5569), [#6754](https://github.com/decaporg/decap-cms/issues/6754)
|
|
975
999
|
|
|
976
1000
|
[^49]: Netlify/Decap CMS [#5752](https://github.com/decaporg/decap-cms/issues/5752)
|
|
977
1001
|
|
|
@@ -979,7 +1003,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
979
1003
|
|
|
980
1004
|
[^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)
|
|
981
1005
|
|
|
982
|
-
[^52]: Netlify/Decap CMS [#7147](https://github.com/decaporg/decap-cms/issues/7147)
|
|
1006
|
+
[^52]: Netlify/Decap CMS [#6970](https://github.com/decaporg/decap-cms/issues/6970), [#7147](https://github.com/decaporg/decap-cms/issues/7147)
|
|
983
1007
|
|
|
984
1008
|
[^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)
|
|
985
1009
|
|
|
@@ -1089,9 +1113,9 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1089
1113
|
|
|
1090
1114
|
[^106]: Netlify/Decap CMS [#2822](https://github.com/decaporg/decap-cms/issues/2822)
|
|
1091
1115
|
|
|
1092
|
-
[^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), [#4818](https://github.com/decaporg/decap-cms/issues/4818), [#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)
|
|
1116
|
+
[^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), [#4818](https://github.com/decaporg/decap-cms/issues/4818), [#5688](https://github.com/decaporg/decap-cms/issues/5688), [#6828](https://github.com/decaporg/decap-cms/issues/6828), [#6829](https://github.com/decaporg/decap-cms/issues/6829), [#6862](https://github.com/decaporg/decap-cms/issues/6862), [#7023](https://github.com/decaporg/decap-cms/issues/7023)
|
|
1093
1117
|
|
|
1094
|
-
[^108]: Netlify/Decap CMS [#
|
|
1118
|
+
[^108]: Netlify/Decap CMS [#6879](https://github.com/decaporg/decap-cms/issues/6879)
|
|
1095
1119
|
|
|
1096
1120
|
[^109]: Netlify/Decap CMS [#7197](https://github.com/decaporg/decap-cms/issues/7197)
|
|
1097
1121
|
|
|
@@ -1109,7 +1133,7 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1109
1133
|
|
|
1110
1134
|
[^116]: Netlify/Decap CMS [#3431](https://github.com/decaporg/decap-cms/issues/3431)
|
|
1111
1135
|
|
|
1112
|
-
[^117]: Netlify/Decap CMS [#3562](https://github.com/decaporg/decap-cms/issues/3562)
|
|
1136
|
+
[^117]: Netlify/Decap CMS [#3562](https://github.com/decaporg/decap-cms/issues/3562), [#6215](https://github.com/decaporg/decap-cms/issues/6215)
|
|
1113
1137
|
|
|
1114
1138
|
[^118]: Netlify/Decap CMS [#7267](https://github.com/decaporg/decap-cms/issues/7267)
|
|
1115
1139
|
|
|
@@ -1136,3 +1160,27 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1136
1160
|
[^129]: Netlify/Decap CMS [#4961](https://github.com/decaporg/decap-cms/issues/4961), [#4979](https://github.com/decaporg/decap-cms/issues/4979), [#5545](https://github.com/decaporg/decap-cms/issues/5545), [#5778](https://github.com/decaporg/decap-cms/issues/5778), [#6279](https://github.com/decaporg/decap-cms/issues/6279), [#6464](https://github.com/decaporg/decap-cms/issues/6464), [#6810](https://github.com/decaporg/decap-cms/issues/6810), [#6922](https://github.com/decaporg/decap-cms/issues/6922), [#7118](https://github.com/decaporg/decap-cms/issues/7118), [#7293](https://github.com/decaporg/decap-cms/issues/7293) — A comment on one of the issues says the crash was due to Google Translate. Sveltia CMS has turned off Google Translate on the admin page.
|
|
1137
1161
|
|
|
1138
1162
|
[^130]: Netlify/Decap CMS [#6571](https://github.com/decaporg/decap-cms/issues/6571)
|
|
1163
|
+
|
|
1164
|
+
[^131]: Netlify/Decap CMS [#4429](https://github.com/decaporg/decap-cms/issues/4429)
|
|
1165
|
+
|
|
1166
|
+
[^132]: Netlify/Decap CMS [#6816](https://github.com/decaporg/decap-cms/issues/6816)
|
|
1167
|
+
|
|
1168
|
+
[^133]: Netlify/Decap CMS [#445](https://github.com/decaporg/decap-cms/issues/445)
|
|
1169
|
+
|
|
1170
|
+
[^134]: Netlify/Decap CMS [#5548](https://github.com/decaporg/decap-cms/issues/5548)
|
|
1171
|
+
|
|
1172
|
+
[^135]: Netlify/Decap CMS [#2133](https://github.com/decaporg/decap-cms/issues/2133)
|
|
1173
|
+
|
|
1174
|
+
[^136]: Netlify/Decap CMS [#7085](https://github.com/decaporg/decap-cms/issues/7085)
|
|
1175
|
+
|
|
1176
|
+
[^137]: Netlify/Decap CMS [#4092](https://github.com/decaporg/decap-cms/issues/4092)
|
|
1177
|
+
|
|
1178
|
+
[^138]: Netlify/Decap CMS [#4841](https://github.com/decaporg/decap-cms/issues/4841)
|
|
1179
|
+
|
|
1180
|
+
[^139]: Netlify/Decap CMS [#6202](https://github.com/decaporg/decap-cms/issues/6202)
|
|
1181
|
+
|
|
1182
|
+
[^140]: Netlify/Decap CMS [#5444](https://github.com/decaporg/decap-cms/issues/5444)
|
|
1183
|
+
|
|
1184
|
+
[^141]: Netlify/Decap CMS [#3723](https://github.com/decaporg/decap-cms/issues/3723)
|
|
1185
|
+
|
|
1186
|
+
[^142]: Netlify/Decap CMS [#7124](https://github.com/decaporg/decap-cms/issues/7124)
|