@sveltia/cms 0.53.5 → 0.54.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 CHANGED
@@ -59,6 +59,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
59
59
  - [Using a custom icon for a collection](#using-a-custom-icon-for-a-collection)
60
60
  - [Adding dividers to the collection list](#adding-dividers-to-the-collection-list)
61
61
  - [Using a custom media folder for a collection](#using-a-custom-media-folder-for-a-collection)
62
+ - [Specifying default sort field and direction](#specifying-default-sort-field-and-direction)
62
63
  - [Using keyboard shortcuts](#using-keyboard-shortcuts)
63
64
  - [Using DeepL to translate entry fields](#using-deepl-to-translate-entry-fields)
64
65
  - [Localizing entry slugs](#localizing-entry-slugs)
@@ -81,7 +82,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
81
82
 
82
83
  Sveltia CMS was born in November 2022, when the progress of Netlify CMS was stalled for more than six months. [@kyoshino](https://github.com/kyoshino)’s clients wanted to replace their Netlify CMS instances without much effort, mainly to get better internationalization (i18n) support.
83
84
 
84
- To achieve radical improvements in UX, performance, i18n and other areas, it was decided to build an alternative from the ground up, while ensuring an easy migration path from the other. After proving the concept with a rapid [Svelte](https://svelte.dev/) prototype, development was accelerated to address their primary use cases. The new product has since been named Sveltia CMS and released as open source software to encourage wider adoption.
85
+ To achieve radical improvements in UX, performance, i18n and other areas, it was ultimately decided to build an alternative from the ground up, while ensuring an easy migration path from the other. After proving the concept with a rapid [Svelte](https://svelte.dev/) prototype, development was accelerated to address their primary use cases. The new product has since been named Sveltia CMS and released as open source software to encourage wider adoption.
85
86
 
86
87
  We loved the concept of Netlify CMS — a single page app served from a CDN, plus a single YAML config file — and we wanted to revive it, modernize it, and take it to the next level.
87
88
 
@@ -100,7 +101,7 @@ While Sveltia CMS is specifically designed to replace legacy Netlify CMS instanc
100
101
  ### Our goals
101
102
 
102
103
  - Making Sveltia CMS a viable, definitive successor to Netlify CMS
103
- - Empowering small businesses and individuals who need a simple, free, yet powerful CMS solution
104
+ - Empowering small businesses and individuals who need a simple, free, yet powerful, high-quality CMS solution
104
105
  - Emerging as the leading open source offering in the Git-based CMS market
105
106
  - Extending its capabilities as digital asset management (DAM) software
106
107
  - Showcasing the power of Svelte and UX engineering
@@ -112,17 +113,18 @@ Sveltia CMS is currently in **beta** and version 1.0 is expected to ship in **ea
112
113
  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 that require considerable effort:
113
114
 
114
115
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
116
+ - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
115
117
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
116
- - So far, 155+ of them, or 305+ including duplicates, have been effectively solved in Sveltia CMS
118
+ - So far, 160+ of them, or 310+ including duplicates, have been effectively solved in Sveltia CMS
117
119
  - Target: 300 or all relevant, fixable and worthwhile issues in the future; 500 including duplicates
118
- - Note: Issues include feature requests, bug reports, [stale issues](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+%22Closing+as+stale%22) and [discussions](https://github.com/decaporg/decap-cms/discussions)
120
+ - Note: Issues include feature requests, bug reports, [“closed as stale issues](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+%22Closing+as+stale%22) and [discussions](https://github.com/decaporg/decap-cms/discussions)
119
121
  - Many of their [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) are on our table or already implemented in Sveltia CMS
120
122
  - Solving [our own issues](https://github.com/sveltia/sveltia-cms/issues)
121
123
  - Implementing our own enhancement ideas for every part of the product
122
124
  - Responding to requests from the maintainer’s clients
123
125
  - Making the code clean and maintainable
124
126
 
125
- ![300 Netlify/Decap CMS Issues Solved in Sveltia CMS (Including Duplicates)](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1-2025010304.webp)<br>
127
+ ![310 Netlify/Decap CMS Issues Solved in Sveltia CMS (Including Duplicates)](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1-20250117.webp)<br>
126
128
 
127
129
  ## Differentiators
128
130
 
@@ -134,21 +136,21 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
134
136
  - The maintainer tries to be as responsive as possible. While there are no guarantees, the typical turnaround time for a bug fix is less than 24 hours.
135
137
  - Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
136
138
  - We develop [our own UI library](https://github.com/sveltia/sveltia-ui) to ensure optimal usability without compromising accessibility.
137
- - 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 shortly after the 1.0 release.
138
- - 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 React application crashes[^113][^129]. Best of all, Svelte offers great performance.
139
+ - 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.
140
+ - Made with [Svelte](https://svelte.dev/), not React, means we can spend more time on UX rather than tedious state management. It also allows us to avoid common React application crashes[^113][^129]. Best of all, Svelte offers great performance.
139
141
  - The in-app Help menu provides all links to useful resources, including release notes, feedback and support.
140
142
  - Users can personalize the application with various settings, including appearance and language. Developer Mode can also be enabled.
141
143
  - 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].
142
144
 
143
145
  ### Better performance
144
146
 
145
- - Built completely from scratch with Svelte instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with any framework or static site generator (SSG) that can load static data files during the build process.
146
- - Small footprint: The bundle size is less than 500 KB when minified and brotlied, which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.8 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet, but rather implemented many new features. That’s the power of Svelte + Vite.
147
- - We have upgraded from Svelte 4 to [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) to further improve performance, including an even smaller bundle size. A full migration to the Runes reactivity API is in progress.
148
- - Sveltia CMS is free of technical debt (except for Moment.js, which will soon be replaced by Day.js) and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
147
+ - Built completely from scratch with [Svelte](https://svelte.dev/) instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with any framework or static site generator (SSG) that can load static data files during the build process.
148
+ - 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.7 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet, but rather added many new features. That’s the power of Svelte + [Vite](https://vite.dev/).
149
+ - We have upgraded from Svelte 4 to [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) to further improve performance, including an even smaller bundle size. A full migration to the Runes reactivity API is underway.
150
+ - Sveltia CMS is free of technical debt (except for the Moment.js dependency, which will soon be replaced by Day.js) and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
149
151
  - 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 ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
150
152
  - 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/).
151
- - Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern File System Access API to read and write files natively through the web browser, rather than using a slow, ad hoc REST API through a proxy server.
153
+ - Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern [File System Access API](https://developer.chrome.com/articles/file-system-access/) to read and write files natively through the web browser, rather than using a slow, ad hoc REST API through a proxy server.
152
154
  - Sorting, filtering and grouping of entries is done instantly without reloading the entire content.
153
155
  - Uses caching, lazy loading and infinite scrolling techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
154
156
  - Thumbnails of assets, including videos and PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
@@ -211,7 +213,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the hundreds of
211
213
 
212
214
  ### Better i18n support
213
215
 
214
- Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect best-in-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 [multicultural city](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
216
+ Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect best-in-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](https://www.mozilla.org/) and currently lives in [one of the most multicultural cities in the world](https://en.wikipedia.org/wiki/Toronto) where 150+ languages are spoken.
215
217
 
216
218
  - Configuration
217
219
  - The [i18n limitations](https://decapcms.org/docs/i18n/#limitations) in Netlify/Decap CMS do not apply to Sveltia CMS:
@@ -239,6 +241,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
239
241
  - 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].
240
242
  - Fields in non-default locales are validated as expected[^13].
241
243
  - No internal error is thrown when changing the locale[^103].
244
+ - Duplicating an entry duplicates all locale content, not just the default locale[^170].
242
245
 
243
246
  ### Better collections
244
247
 
@@ -246,7 +249,11 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
246
249
  - Provides some new options, including:
247
250
  - `icon`: [Choose a custom icon for each collection](#using-a-custom-icon-for-a-collection)[^3].
248
251
  - `divider`: [Add dividers to the collection list](#adding-dividers-to-the-collection-list).
249
- - `thumbnail`: Specify the field name for a thumbnail displayed on the entry list, like `thumbnail: featuredImage`[^130]. A nested field can be specified using dot notation, e.g. `images.0.src`. If undefined, the `name` of the first image field is used.
252
+ - `thumbnail`: Specify the field name for a thumbnail displayed on the entry list, like `thumbnail: featuredImage`[^130].
253
+ - A nested field can be specified using dot notation, e.g. `heroImage.src`.
254
+ - A wildcard in the field name is also supported, e.g. `images.*.src`.
255
+ - Multiple field names can be specified as an array for fallback purpose, e.g. `[thumbnail, cover]`.
256
+ - If this option is omitted, any non-nested, non-empty Image or File field will be used[^173].
250
257
  - Enhancements to the entry `filter` option for folder collections:
251
258
  - Boolean `value` works as expected[^93].
252
259
  - `value` accepts `null` to match an undefined field value.
@@ -271,6 +278,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
271
278
  - Setting the collection `path` doesn’t affect the entry slugs stored with the Relation widget[^137].
272
279
  - Entry slugs are [localizable](#localizing-entry-slugs)[^80].
273
280
  - Entry listing
281
+ - [Default sort field and direction](#specifying-default-entry-sort-field-and-direction) can be specified[^172].
274
282
  - Sorting entries by a DateTime field works as expected[^110].
275
283
  - Entry grouping and sorting can work together. For example, it’s possible to group by year and then sort by year if configured properly.
276
284
  - 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.
@@ -350,10 +358,11 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
350
358
  - Users can preview variable types without having to register a preview template[^42].
351
359
  - It’s possible to omit `fields` in a variable type object[^163]. In that case only the `typeKey` (default: `type`) is saved in the output.
352
360
  - Markdown
353
- - 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].
361
+ - 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], an extra line break when pasting[^169], backslash injections[^53], dropdown visibility[^70], and text input difficulties with IME[^54].
354
362
  - The default editor mode can be set 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.
355
363
  - A combination of bold and italic doesn’t create a confusing 3-asterisk markup[^160]. In our editor, bold is 2 asterisks and italic is an underscore.
356
364
  - The built-in `image` component can be inserted with a single click.
365
+ - The built-in `image` component allows users to add, edit or remove a link set on an image[^171].
357
366
  - The built-in `code-block` component is implemented just like a blockquote. You can simply convert a normal paragraph into a code block instead of adding a component.
358
367
  - Code in a code block in the editor can be copied as expected[^165].
359
368
  - Line breaks are rendered as line breaks in the Preview pane according to GitHub Flavored Markdown (GFM).
@@ -418,7 +427,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
418
427
  ### Better asset management
419
428
 
420
429
  - A completely new, full-fledged Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents[^96].
421
- - Navigate between the global media folder and collection media folders[^6].
430
+ - Navigate between the global media folder and [collection media folders](#using-a-custom-media-folder-for-a-collection)[^6].
422
431
  - Preview image, audio, video, text and PDF files. Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
423
432
  - Copy the public URL[^74], file path, text data or image data of a selected asset to clipboard. The file path starts with `/` as expected[^48].
424
433
  - Edit plain text assets, including SVG images.
@@ -470,7 +479,7 @@ However, 100% feature parity is not planned, and some features are still missing
470
479
 
471
480
  ### Features to be implemented before GA
472
481
 
473
- These limitations are expected to be resolved before the 1.0 release:
482
+ These limitations are expected to be resolved before the 1.0 release scheduled for early 2025:
474
483
 
475
484
  | Feature | Status in Sveltia CMS |
476
485
  | --- | --- |
@@ -487,7 +496,7 @@ These limitations are expected to be resolved before the 1.0 release:
487
496
  | [DateTime](https://decapcms.org/docs/widgets/#datetime) | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note that [Decap CMS 3.1.1](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1) replaced [Moment.js](https://momentjs.com/) with [Day.js](https://day.js.org/), and [Decap CMS 3.3.0](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.3.0) made other changes to the widget behaviour; we’ll follow these changes where it makes sense. |
488
497
  | [File](https://decapcms.org/docs/widgets/#file) / [Image](https://decapcms.org/docs/widgets/#image) | Field-specific media folders (beta) and media library options are not yet supported other than `media_library.config.max_file_size` for the default media library. |
489
498
  | [Map](https://decapcms.org/docs/widgets/#map) | Coming soon. |
490
- | [Markdown](https://decapcms.org/docs/widgets/#markdown) | Custom components are not yet supported. There is no language selection yet in the built-in `code-block` component. |
499
+ | [Markdown](https://decapcms.org/docs/widgets/#markdown) | Custom components are not yet supported. There is no language selector yet in the built-in `code-block` component. |
491
500
 
492
501
  ### Features to be implemented after GA
493
502
 
@@ -503,7 +512,7 @@ We plan to provide partial compatibility with [Static CMS](https://github.com/St
503
512
 
504
513
  - Configuration options
505
514
  - Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/decap-migration-guide) to sortable fields, view filters/groups, List widget, etc. while Sveltia CMS follows Netlify/Decap CMS, so you should review your configuration carefully.
506
- - The `default` option for sortable fields, view filters and view groups will be implemented in Sveltia CMS soon. ([#304](https://github.com/sveltia/sveltia-cms/issues/304))
515
+ - The `default` option for sortable fields is [implemented in Sveltia CMS](#specifying-default-sort-field-and-direction).
507
516
  - Directory navigation in the Asset Library is partially supported in Sveltia CMS. If you define [collection-specific `media_folder`s](#using-a-custom-media-folder-for-a-collection), these folders will be displayed in the Asset Library and Select File/Image dialog. Display of subfolders within a configured folder will be implemented soon. We don’t plan to support the `folder_support` and `display_in_navigation` options for `media_library`; subfolders will be displayed with no configuration. ([#301](https://github.com/sveltia/sveltia-cms/issues/301))
508
517
  - The `logo_link` global option will not be supported. Use `display_url` or `site_url` instead.
509
518
  - The `yaml` global option will not be supported, as Sveltia CMS doesn’t expose the `yaml` library options directly for forward compatibility reasons. However, we do have some [data output options](#controlling-data-output), including YAML indentation and quotes.
@@ -703,6 +712,24 @@ Rather, if you’d like to add all the media files for a collection in one singl
703
712
 
704
713
  In Sveltia CMS, those collection media folders are displayed prominently for easier asset management. We recommend setting `media_folder` and `public_folder` for each collection if it contains one or more File/Image fields.
705
714
 
715
+ ### Specifying default sort field and direction
716
+
717
+ Sveltia CMS has extended the `sortable_fields` collection option to allow developers to define the field name and direction to be used for sorting entries by default. Our implementation is compatible with Static CMS. This is especially useful if you want to sort entries by date from new to old:
718
+
719
+ ```yaml
720
+ collections:
721
+ - name: posts
722
+ sortable_fields:
723
+ fields: ['title', 'published_date', 'author']
724
+ default:
725
+ field: published_date
726
+ direction: descending # or ascending
727
+ ```
728
+
729
+ For backward compatibility with [Netlify/Decap CMS](https://decapcms.org/docs/configuration-options/#sortable_fields), `sortable_fields` with a field list (an array) will continue to work.
730
+
731
+ 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`.
732
+
706
733
  ### Using keyboard shortcuts
707
734
 
708
735
  - View the Content Library: `Alt+1`
@@ -1016,6 +1043,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1016
1043
  ### Before the 1.0 release
1017
1044
 
1018
1045
  - Enhanced [compatibility with Netlify/Decap CMS](#compatibility)
1046
+ - Tackling some more Netlify/Decap CMS issues
1019
1047
  - [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
1020
1048
  - Accessibility audit
1021
1049
  - Developer documentation (implementation guide)
@@ -1027,7 +1055,7 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1027
1055
  ### After the 1.0 release
1028
1056
 
1029
1057
  - Implementing the [remaining Netlify/Decap CMS features](#features-to-be-implemented-after-ga)
1030
- - Tackling more Netlify/Decap CMS issues, including MDX support[^122], manual entry sorting[^125], mobile optimization[^18], config editor[^10] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc)
1058
+ - Tackling even more Netlify/Decap CMS issues, including MDX support[^122], manual entry sorting[^125], mobile optimization[^18], config editor[^10] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc)
1031
1059
  - Exploring features that require server-side implementation, including user management (Netlify Identity alternative), roles[^23], commits without a GitHub or GitLab account (Git Gateway alternative), post locking (like [WordPress](https://codex.wordpress.org/Post_Locking))[^166] and scheduled posts[^167]
1032
1060
  - Considering further [compatibility with Static CMS](#compatibility-with-static-cms)
1033
1061
  - More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools
@@ -1389,3 +1417,13 @@ This software is provided “as is” without any express or implied warranty. W
1389
1417
  [^167]: Netlify/Decap CMS [#263](https://github.com/decaporg/decap-cms/issues/263)
1390
1418
 
1391
1419
  [^168]: Netlify/Decap CMS [#1948](https://github.com/decaporg/decap-cms/issues/1948)
1420
+
1421
+ [^169]: Netlify/Decap CMS [#7364](https://github.com/decaporg/decap-cms/issues/7364)
1422
+
1423
+ [^170]: Netlify/Decap CMS [#7371](https://github.com/decaporg/decap-cms/issues/7371)
1424
+
1425
+ [^171]: Netlify/Decap CMS [#4754](https://github.com/decaporg/decap-cms/issues/4754)
1426
+
1427
+ [^172]: Netlify/Decap CMS [#3715](https://github.com/decaporg/decap-cms/issues/3715)
1428
+
1429
+ [^173]: Netlify/Decap CMS [#3715](https://github.com/decaporg/decap-cms/issues/5317)