@sveltia/cms 0.70.8 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -6
- package/dist/sveltia-cms.js +264 -256
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +267 -259
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/public.d.ts +22 -0
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
65
65
|
- [Adding dividers to the collection list](#adding-dividers-to-the-collection-list)
|
|
66
66
|
- [Using a custom media folder for a collection](#using-a-custom-media-folder-for-a-collection)
|
|
67
67
|
- [Specifying default sort field and direction](#specifying-default-sort-field-and-direction)
|
|
68
|
+
- [Editing Hugo’s special index file in a folder collection](#editing-hugos-special-index-file-in-a-folder-collection)
|
|
68
69
|
- [Using keyboard shortcuts](#using-keyboard-shortcuts)
|
|
69
70
|
- [Using DeepL to translate entry fields](#using-deepl-to-translate-entry-fields)
|
|
70
71
|
- [Localizing entry slugs](#localizing-entry-slugs)
|
|
@@ -160,7 +161,7 @@ Netlify/Decap CMS users will definitely be pleased and surprised by the numerous
|
|
|
160
161
|
|
|
161
162
|
### Better performance
|
|
162
163
|
|
|
163
|
-
- Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast with [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead). Note that Sveltia CMS is framework-agnostic; it’s served as a vanilla JavaScript bundle.
|
|
164
|
+
- Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast with [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead). Note that Svelte is a compiler and Sveltia CMS is framework-agnostic; it’s served as a vanilla JavaScript bundle.
|
|
164
165
|
- Small footprint: The bundle size is less than 500 KB when minified and [brotlied](https://en.wikipedia.org/wiki/Brotli), which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.5 MB) and Static CMS (2.6 MB).[^57][^64] This number is remarkable because even though some Netlify/Decap CMS features are [omitted](#features-not-to-be-implemented) or [unimplemented](#current-limitations) in Sveltia CMS, we have added a lot of new features. That’s the power of [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) + [Vite](https://vite.dev/).
|
|
165
166
|
- Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly[^32][^65] (the useless `search` configuration option is therefore ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets.[^14]
|
|
166
167
|
- Saving entries and assets to GitHub is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
|
|
@@ -310,7 +311,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
310
311
|
- [Default sort field and direction](#specifying-default-entry-sort-field-and-direction) can be specified.[^172]
|
|
311
312
|
- Sorting entries by a DateTime field works as expected.[^110]
|
|
312
313
|
- Entry grouping and sorting can work together. For example, it’s possible to group by year and then sort by year if configured properly.
|
|
313
|
-
- Hugo’s special `_index.md`
|
|
314
|
+
- [Index file inclusion](#editing-hugos-special-index-file-in-a-folder-collection) allows users to edit Hugo’s special `_index.md` file, including localized ones like `_index.en.md`, within a folder collection.[^201] If the `index_file` option is not defined, these files will be hidden in a folder collection unless the `path` option is configured to end with `_index` and the `extension` is `md`.[^120]
|
|
314
315
|
- A console error won’t be thrown when a collection doesn’t have the `title` field.[^152] In that case, an entry summary will be generated from a header in the Markdown `body` field, if exists, or from the entry slug, so the summary will never be an empty.[^161] This supports a typical VitePress setup.
|
|
315
316
|
- 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]
|
|
316
317
|
- A single file can be used for more than one item in a file collection.[^127]
|
|
@@ -359,6 +360,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
359
360
|
- Leading/trailing whitespaces in text-type field values are automatically removed when you save an entry.[^37]
|
|
360
361
|
- YAML string folding (maximum line width) is disabled, mainly for framework compatibility.[^119]
|
|
361
362
|
- DateTime field values in ISO 8601 format are stored in native date/time format instead of quoted strings when the data output is TOML.[^147]
|
|
363
|
+
- In a JSON/YAML output, a standard time is formatted as `HH:mm:ss` instead of `HH:mm` for framework compatibility.
|
|
362
364
|
- Provides JSON/YAML format options as part of the [data output options](#controlling-data-output), including indentation and quotes.[^155][^9]
|
|
363
365
|
- The `yaml_quote` collection option added in [v0.5.10](https://github.com/sveltia/sveltia-cms/releases/tag/v0.5.10) is now deprecated and will be removed in v1.0.0. `yaml_quote: true` is equivalent to `quote: double` in the new YAML format options.
|
|
364
366
|
|
|
@@ -516,7 +518,7 @@ However, 100% feature parity is not planned, and some features are still missing
|
|
|
516
518
|
|
|
517
519
|
### Features not to be implemented
|
|
518
520
|
|
|
519
|
-
- **The Azure, Bitbucket,
|
|
521
|
+
- **The Azure, Bitbucket, Forgejo and Git Gateway backends**: For performance reasons. [Git Gateway](https://github.com/netlify/git-gateway) has not been actively maintained since Netlify CMS was abandoned, and it’s known to be slow and prone to rate limit violations. We plan to develop a GraphQL-based high-performance alternative in the future. We may also support the other platforms if their APIs improve to allow the CMS to fetch multiple entries at once.
|
|
520
522
|
- **Netlify Identity Widget**: It’s not useful without Git Gateway, and the Netlify Identity service itself is now [deprecated](https://www.netlify.com/changelog/deprecation-netlify-identity/). We plan to develop an alternative solution with role support in the future, most likely using [Cloudflare Workers](https://workers.cloudflare.com/) and [Auth.js](https://authjs.dev/).
|
|
521
523
|
- The deprecated client-side implicit grant for the GitLab backend: It has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
|
|
522
524
|
- The deprecated Netlify Large Media service: Consider other storage providers.
|
|
@@ -542,12 +544,13 @@ However, 100% feature parity is not planned, and some features are still missing
|
|
|
542
544
|
|
|
543
545
|
### Current limitations
|
|
544
546
|
|
|
545
|
-
These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release.
|
|
547
|
+
These Netlify/Decap CMS features are not yet implemented in Sveltia CMS. We are working hard to add them before the 1.0 release due Q3 2025.
|
|
546
548
|
|
|
547
549
|
- Comprehensive site config validation
|
|
548
550
|
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md) other than English and Japanese
|
|
551
|
+
- [Gitea backend](https://decapcms.org/docs/gitea-backend/) ([#198](https://github.com/sveltia/sveltia-cms/issues/198))
|
|
549
552
|
- [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/) media libraries ([#4](https://github.com/sveltia/sveltia-cms/discussions/4))
|
|
550
|
-
- Field-specific media folders for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
|
|
553
|
+
- Field-specific media folders (beta) for the [File](https://decapcms.org/docs/widgets/#file) and [Image](https://decapcms.org/docs/widgets/#image) widgets
|
|
551
554
|
- [Map](https://decapcms.org/docs/widgets/#map) widget
|
|
552
555
|
- [Custom widgets](https://decapcms.org/docs/custom-widgets/)
|
|
553
556
|
- [Custom editor components](https://decapcms.org/docs/custom-widgets/#registereditorcomponent): Support for preview, Object/List widgets, and the `default` field option
|
|
@@ -558,7 +561,7 @@ Due to the complexity, the following features will be added after the 1.0 releas
|
|
|
558
561
|
|
|
559
562
|
- [Editorial Workflow](https://decapcms.org/docs/editorial-workflows/)
|
|
560
563
|
- [Open Authoring](https://decapcms.org/docs/open-authoring/)
|
|
561
|
-
- [Nested Collections](https://decapcms.org/docs/collection-nested/)
|
|
564
|
+
- [Nested Collections](https://decapcms.org/docs/collection-nested/) (beta)
|
|
562
565
|
|
|
563
566
|
Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?labels=bug). Bear in mind that undocumented behaviour can easily be overlooked.
|
|
564
567
|
|
|
@@ -818,6 +821,25 @@ For backward compatibility with [Netlify/Decap CMS](https://decapcms.org/docs/co
|
|
|
818
821
|
|
|
819
822
|
For backward compatibility with [Static CMS](https://staticjscms.netlify.app/docs/collection-overview#sortable-fields), the `direction` option accepts title case values: `Ascending` and `Descending`. However, `None` is not supported and has the same effect as `ascending`.
|
|
820
823
|
|
|
824
|
+
### Editing Hugo’s special index file in a folder collection
|
|
825
|
+
|
|
826
|
+
Before this feature, Hugo’s [special `_index.md` file](https://gohugo.io/content-management/organization/#index-pages-_indexmd) was hidden in a folder collection, and you had to create a file collection to manage the file, since it usually comes with a different set of fields than regular entry fields. Now, with the new `index_file` option, you can include the index file inside a folder collection, above regular entries, for easier editing:
|
|
827
|
+
|
|
828
|
+
```yaml
|
|
829
|
+
collections:
|
|
830
|
+
- name: posts
|
|
831
|
+
label: Blog posts
|
|
832
|
+
folder: data/posts/
|
|
833
|
+
fields: # Fields for regular entries
|
|
834
|
+
...
|
|
835
|
+
index_file:
|
|
836
|
+
name: _index # File name, required
|
|
837
|
+
fields: # Fields for the index file. If omitted, regular fields are used
|
|
838
|
+
...
|
|
839
|
+
editor:
|
|
840
|
+
preview: false # Hide preview, optional
|
|
841
|
+
```
|
|
842
|
+
|
|
821
843
|
### Using keyboard shortcuts
|
|
822
844
|
|
|
823
845
|
- View the Content Library: `Alt+1`
|
|
@@ -1268,6 +1290,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
|
|
|
1268
1290
|
## Trivia
|
|
1269
1291
|
|
|
1270
1292
|
- The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. And now we are completely rewriting it in Svelte. So this is effectively the second time the application has gone through a framework migration.
|
|
1293
|
+
- 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 paramount to our rapid application development.
|
|
1271
1294
|
|
|
1272
1295
|
## Related links
|
|
1273
1296
|
|
|
@@ -1683,3 +1706,5 @@ This software is provided “as is” without any express or implied warranty. W
|
|
|
1683
1706
|
[^199]: Netlify/Decap CMS [#5419](https://github.com/decaporg/decap-cms/issues/5419), [#7107](https://github.com/decaporg/decap-cms/issues/7107)
|
|
1684
1707
|
|
|
1685
1708
|
[^200]: Netlify/Decap CMS [#1322](https://github.com/decaporg/decap-cms/issues/1322), [#6442](https://github.com/decaporg/decap-cms/issues/6442)
|
|
1709
|
+
|
|
1710
|
+
[^201]: Netlify/Decap CMS [#7381](https://github.com/decaporg/decap-cms/issues/7381)
|