@sveltia/cms 0.70.8 → 0.71.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 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
+ - [Including Hugo’s special index file in a folder collection](#including-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` files, including localized ones like `_index.en.md`, 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.
314
+ - [Index file inclusion](#including-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, Gitea/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.
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,9 +561,9 @@ 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
- 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.
566
+ Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=bug). Bear in mind that undocumented behaviour can easily be overlooked.
564
567
 
565
568
  ### Compatibility with Static CMS
566
569
 
@@ -589,6 +592,8 @@ While Sveltia CMS is built with Svelte, the application is **framework-agnostic*
589
592
 
590
593
  You can use the CMS with any framework or static site generator (SSG) that can load static files during the build process, including but not limited to Astro, Eleventy, Hugo, Jekyll, Next.js, SvelteKit and VitePress.
591
594
 
595
+ We have added support for features required by certain frameworks, such as [index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) and [slug localization](#localizing-entry-slugs) for Hugo, and [some enhancements](https://github.com/sveltia/sveltia-cms/issues/230) for VitePress. [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=feature) if your framework has specific needs.
596
+
592
597
  ### Browser support
593
598
 
594
599
  Sveitia CMS works with all modern browsers, but there are a few limitations because it utilizes some new web technologies:
@@ -762,7 +767,7 @@ fields:
762
767
  label: Tags
763
768
  icon: sell # or any icon name
764
769
  create: true
765
- folder: data/tags/
770
+ folder: content/tags
766
771
  ```
767
772
 
768
773
  ### Adding dividers to the collection list
@@ -793,7 +798,7 @@ public_folder: /media
793
798
  collections:
794
799
  - name: products
795
800
  label: Products
796
- folder: data/products/
801
+ folder: content/products
797
802
  media_folder: /static/media/products # make sure to append a slash
798
803
  public_folder: /media/products
799
804
  ```
@@ -818,6 +823,25 @@ For backward compatibility with [Netlify/Decap CMS](https://decapcms.org/docs/co
818
823
 
819
824
  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
825
 
826
+ ### Including Hugo’s special index file in a folder collection
827
+
828
+ 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:
829
+
830
+ ```yaml
831
+ collections:
832
+ - name: posts
833
+ label: Blog posts
834
+ folder: content/posts
835
+ fields: # Fields for regular entries
836
+ ...
837
+ index_file:
838
+ name: _index # File name, required
839
+ fields: # Fields for the index file. If omitted, regular fields are used
840
+ ...
841
+ editor:
842
+ preview: false # Hide preview, optional
843
+ ```
844
+
821
845
  ### Using keyboard shortcuts
822
846
 
823
847
  - View the Content Library: `Alt+1`
@@ -866,7 +890,7 @@ collections:
866
890
  - name: posts
867
891
  label: Blog posts
868
892
  create: true
869
- folder: data/posts/
893
+ folder: content/posts
870
894
  slug: '{{title | localize}}' # This does the trick
871
895
  format: yaml
872
896
  i18n: true
@@ -879,12 +903,12 @@ collections:
879
903
 
880
904
  With this configuration, an entry is saved with localized filenames, while the default locale’s slug is stored in each file as an extra `translationKey` property, which is used in [Hugo’s multilingual support](https://gohugo.io/content-management/multilingual/#bypassing-default-linking). Sveltia CMS and Hugo read this property to link localized files.
881
905
 
882
- - `data/posts/en/my-trip-to-new-york.yaml`
906
+ - `content/posts/en/my-trip-to-new-york.yaml`
883
907
  ```yaml
884
908
  translationKey: my-trip-to-new-york
885
909
  title: My trip to New York
886
910
  ```
887
- - `data/posts/fr/mon-voyage-a-new-york.yaml`
911
+ - `content/posts/fr/mon-voyage-a-new-york.yaml`
888
912
  ```yaml
889
913
  translationKey: my-trip-to-new-york
890
914
  title: Mon voyage à New York
@@ -1268,6 +1292,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1268
1292
  ## Trivia
1269
1293
 
1270
1294
  - 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.
1295
+ - 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
1296
 
1272
1297
  ## Related links
1273
1298
 
@@ -1683,3 +1708,5 @@ This software is provided “as is” without any express or implied warranty. W
1683
1708
  [^199]: Netlify/Decap CMS [#5419](https://github.com/decaporg/decap-cms/issues/5419), [#7107](https://github.com/decaporg/decap-cms/issues/7107)
1684
1709
 
1685
1710
  [^200]: Netlify/Decap CMS [#1322](https://github.com/decaporg/decap-cms/issues/1322), [#6442](https://github.com/decaporg/decap-cms/issues/6442)
1711
+
1712
+ [^201]: Netlify/Decap CMS [#7381](https://github.com/decaporg/decap-cms/issues/7381)