@sveltia/cms 0.65.0 → 0.67.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
@@ -53,6 +53,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
53
53
  - [Tips \& tricks](#tips--tricks)
54
54
  - [Moving your site from Netlify to another hosting service](#moving-your-site-from-netlify-to-another-hosting-service)
55
55
  - [Providing a JSON configuration file](#providing-a-json-configuration-file)
56
+ - [Providing multiple configuration files](#providing-multiple-configuration-files)
56
57
  - [Working around an authentication error](#working-around-an-authentication-error)
57
58
  - [Working with a local Git repository](#working-with-a-local-git-repository)
58
59
  - [Enabling local development in Brave](#enabling-local-development-in-brave)
@@ -65,7 +66,7 @@ The free, open source alternative to Netlify/Decap CMS is now in public beta, tu
65
66
  - [Localizing entry slugs](#localizing-entry-slugs)
66
67
  - [Disabling non-default locale content](#disabling-non-default-locale-content)
67
68
  - [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
68
- - [Configure multiple media libraries](#configure-multiple-media-libraries)
69
+ - [Configuring multiple media libraries](#configuring-multiple-media-libraries)
69
70
  - [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
70
71
  - [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
71
72
  - [Controlling data output](#controlling-data-output)
@@ -93,7 +94,7 @@ We loved the concept of Netlify CMS — turning a Git repository into a database
93
94
 
94
95
  Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successors:
95
96
 
96
- - [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork, initial commit made in September 2022 — discontinued in September 2024 after doing a great job
97
+ - [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork, initial commit made in September 2022 — discontinued in September 2024 after making meaningful improvements
97
98
  - **Sveltia CMS**: not a fork but a **complete rewrite** or “total reboot”, started in November 2022, first appeared on GitHub in March 2023
98
99
  - [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version, [announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as the official successor with a Netlify agency partner taking ownership — mostly inactive
99
100
 
@@ -101,10 +102,12 @@ Sveltia CMS is the only project that doesn’t inherit the complexity, technical
101
102
 
102
103
  While Sveltia CMS is specifically designed to replace legacy Netlify CMS instances, it also aims to serve as a substitute for the other Netlify CMS successors. We hope that, especially with the [robust i18n support](#better-i18n-support), our product will eventually become an attractive choice for anyone looking for a free headless CMS.
103
104
 
105
+ Trivia: 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.
106
+
104
107
  ### Our goals
105
108
 
106
109
  - Making Sveltia CMS a viable, definitive successor to Netlify CMS
107
- - Empowering small businesses and individuals who need a simple, free, yet powerful, high-quality CMS solution
110
+ - Empowering SMBs and individuals who need a free, yet powerful, high-quality CMS solution
108
111
  - Emerging as the leading open source offering in the Git-based CMS market
109
112
  - Extending its capabilities as digital asset management (DAM) software
110
113
  - Showcasing the power of Svelte and UX engineering
@@ -121,7 +124,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
121
124
  - So far, 185+ issues, or 375+ if including duplicates, have been effectively solved in Sveltia CMS
122
125
  - Target:
123
126
  - 200 issues, or 400 if including duplicates, by GA (almost there)
124
- - 350 issues, or 600 if including duplicates, in the future (yes, you read that right)
127
+ - 350 issues, or 600 if including duplicates, in the future
125
128
  - Issues include everything from feature requests to bug reports and [issues closed as stale](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+%22Closing+as+stale%22) or without an effective solution, as well as [discussions](https://github.com/decaporg/decap-cms/discussions) and stalled [pull requests](https://github.com/decaporg/decap-cms/pulls)
126
129
  - Most of the bugs, including annoying crashes, are already solved
127
130
  - 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
@@ -130,7 +133,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
130
133
  - Responding to requests from the maintainer’s clients
131
134
  - Making the code clean and maintainable
132
135
 
133
- ![185 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250324)<br>
136
+ ![185 Netlify/Decap CMS Issues Solved in Sveltia CMS](https://raw.githubusercontent.com/sveltia/sveltia-cms/main/docs/headline-1.webp?20250327)<br>
134
137
 
135
138
  ## Differentiators
136
139
 
@@ -145,7 +148,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
145
148
  - Provides immersive dark mode.[^2] The UI theme follows the user’s system preference by default and can be changed in the application settings.
146
149
  - 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.
147
150
  - 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 fatal React application crashes.[^113][^129] Best of all, Svelte offers great performance.
148
- - We build [our own UI library](https://github.com/sveltia/sveltia-ui) to ensure optimal usability without compromising accessibility.
151
+ - We build [our own UI component library](https://github.com/sveltia/sveltia-ui), including custom dialogs,[^196] to ensure optimal usability without compromising accessibility.
149
152
  - The in-app Help menu provides all links to useful resources, including release notes, feedback and support.
150
153
  - Users can personalize the application with various settings, including appearance and language. Developer Mode can also be enabled.
151
154
  - 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]
@@ -154,8 +157,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
154
157
 
155
158
  - 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).
156
159
  - The CMS is compiled and distributed as vanilla JavaScript. You can use it 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.
157
- - 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 + [Vite](https://vite.dev/).
158
- - 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.
160
+ - 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/).
159
161
  - 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]
160
162
  - 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/).
161
163
  - Our [local repository workflow](#working-with-a-local-git-repository) utilizes the modern [File System Access API](https://developer.chrome.com/docs/capabilities/web-apis/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.
@@ -204,14 +206,15 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
204
206
  ### Better installation
205
207
 
206
208
  - Sveltia CMS is built with [Svelte](https://svelte.dev/), and we only publish compiled vanilla JavaScript bundles, so there are no React compatibility issues that might prevent developers from upgrading a project for many months.[^177] We haven’t actually integrated React for custom widgets and other features yet, but anyway, no dependencies will be installed when you [install the app with npm](#installing-with-npm).
207
- - Sveltia CMS also won’t cause peer dependency conflicts due to legacy third-party React UI libraries.[^175] We build the app using [our own Svelte UI library](https://github.com/sveltia/sveltia-ui) to reduce reliance on third-party dependencies.
209
+ - Sveltia CMS also won’t cause peer dependency conflicts due to legacy third-party React UI libraries.[^175] We build the app using [our own Svelte UI component library](https://github.com/sveltia/sveltia-ui) to reduce reliance on third-party dependencies.
210
+ - Some servers and frameworks are known to 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]
208
211
  - The [robots `meta` tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag) is automatically added to HTML to prevent the admin page from being indexed by search engines.[^174] Developers are still encouraged to manually add `<meta name="robots" content="noindex">` to `index.html`, as not all crawlers support dynamically added tags. However, our solution should at least work with Google in case you forget to do so.
209
212
 
210
213
  ### Better configuration
211
214
 
212
- - Some servers and frameworks are known to 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]
213
- - Supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60]
214
- - TypeScript support: We try to keep our type definitions for `CMS.init()` and other methods complete, accurate, up-to-date and annotated.[^190][^191][^192][^193] This makes it easier to provide a site config object when [manually initializing](https://decapcms.org/docs/manual-initialization/) the CMS.
215
+ - Sveltia CMS supports a [JSON configuration file](#providing-a-json-configuration-file) that can be generated for bulk or complex collections.[^60]
216
+ - Also supports [multiple configuration files](#providing-multiple-configuration-files) to allow developers to modularize the configuration.[^197]
217
+ - Improved TypeScript support: We try to keep our type definitions for `CMS.init()` and other methods complete, accurate, up-to-date and annotated.[^190][^191][^192][^193] This makes it easier to provide a site config object when [manually initializing](https://decapcms.org/docs/manual-initialization/) the CMS.
215
218
 
216
219
  ### Better backend support
217
220
 
@@ -225,7 +228,7 @@ We hope Netlify/Decap CMS users will be pleased and surprised by the numerous im
225
228
  - Users won’t get a 404 Not Found error when you sign in to the GitLab backend.[^115]
226
229
  - Features the all-new local backend that boosts DX. See the [productivity section](#better-productivity) above.
227
230
  - Developers can select the local and remote backends while working on a local server.
228
- - The Test backend stores entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS). Developers are free to play with the CMS without discarding changes.[^194]
231
+ - The Test backend saves entries and assets in the browser’s [origin private file system](https://web.dev/articles/origin-private-file-system) (OPFS) so that changes are not discarded when the browser tab is closed or reloaded.[^194]
229
232
 
230
233
  ### Better i18n support
231
234
 
@@ -473,6 +476,9 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
473
476
  - Upload multiple assets at once, including files in nested folders, by browsing or dragging and dropping them into the library.[^5]
474
477
  - Sort or filter assets by name or file type.
475
478
  - View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
479
+ - Enhancements to media library integrations:
480
+ - Supports multiple media libraries with the [new `media_libraries` option](#configuring-multiple-media-libraries).[^195]
481
+ - The `max_file_size` option for the File/Image widget can be defined within the global `media_library` option, using `default` as the library name. It applies to all File/Image entry fields, as well as direct uploads to the Asset Library. The option can also be part of the [new `media_libraries` option](#configuring-multiple-media-libraries).
476
482
  - The global `media_folder` can be an empty string (or `.` or `/`) if you want to store assets in the root folder.
477
483
  - 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]
478
484
  - Assets stored in an entry-relative media folder are displayed in the Asset Library.[^142]
@@ -481,8 +487,6 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
481
487
  - Users can add assets using the Quick Add button in the upper right corner of the application.
482
488
  - Files are uploaded with their original names, without converting uppercase letters and spaces to lowercase letters and hyphens.[^97]
483
489
  - No fatal application crash when uploading assets.[^112]
484
- - Supports multiple media libraries with the [new `media_libraries` option](#configure-multiple-media-libraries).[^195]
485
- - The `max_file_size` option for the File/Image widget can be defined within the global `media_library` option, using `default` as the library name. It applies to all File/Image entry fields, as well as direct uploads to the Asset Library. The option can also be part of the [new `media_libraries` option](#configure-multiple-media-libraries).
486
490
 
487
491
  ### Better customization
488
492
 
@@ -496,7 +500,6 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
496
500
  - The application UI locale is automatically selected based on the preferred language set with the browser.[^132] Users can also change the locale in the application settings. Therefore, the `locale` configuration option is ignored and `CMS.registerLocale()` is not required.
497
501
  - 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]
498
502
  - Long menu item labels, especially in non-English locales, don’t overflow the dropdown container.[^117]
499
- - We are migrating from [`svelte-i18n`](https://github.com/kaisermann/svelte-i18n) to the new [MessageFormat 2](https://github.com/unicode-org/message-format-wg)-based `sveltia-i18n` library for natural-sounding translations in every locale.
500
503
 
501
504
  ## Compatibility
502
505
 
@@ -559,7 +562,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
559
562
  - The `default` option for sortable fields is [implemented in Sveltia CMS](#specifying-default-sort-field-and-direction).
560
563
  - 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 before GA. 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))
561
564
  - The `logo_link` global option will not be supported. Use `display_url` or `site_url` instead.
562
- - 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.
565
+ - The `yaml` global option will not be supported, as Sveltia CMS doesn’t expose the underlying `yaml` library options for forward compatibility reasons. However, we do have some [data output options](#controlling-data-output), including YAML indentation and quotes.
563
566
  - I18n support
564
567
  - The `enforce_required_non_default` i18n option will not be supported. Sveitia CMS enforces required fields in all locales by default. However, the `save_all_locales` or `initial_locales` i18n option allows users to [disable non-default locales](#disabling-non-default-locale-content) if needed. Developers can also specify a subset of locales with the `required` field option, e.g. `required: [en]`.
565
568
  - Widgets
@@ -584,7 +587,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
584
587
 
585
588
  Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/basic-steps/) to add it to your site and create a configuration file first. Skip the [Choosing a Backend](https://decapcms.org/docs/choosing-a-backend/) page and choose the [GitHub](https://decapcms.org/docs/github-backend/) or [GitLab](https://decapcms.org/docs/gitlab-backend/) backend instead. Then migrate to Sveltia CMS as described below.
586
589
 
587
- As the product evolves, we’ll implement a built-in configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.
590
+ Unfortunately, we are unable to provide free installation and setup support at this time. As the product evolves, we’ll implement a built-in configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.
588
591
 
589
592
  Here are some starter kits for popular frameworks created by community members. More to come! (Note: These third-party resources are not necessarily reviewed by the Sveltia CMS team.)
590
593
 
@@ -665,6 +668,21 @@ Sveltia CMS supports a configuration file written in the JSON format in addition
665
668
 
666
669
  Alternatively, you can [manually initialize](https://decapcms.org/docs/manual-initialization/) the CMS with a JavaScript configuration object.
667
670
 
671
+ ### Providing multiple configuration files
672
+
673
+ With Sveltia CMS, developers can modularize the site configuration. Just provide multiple config links and the CMS will automatically merge them in the order of `<link>` tag appearance. It’s possible to use YAML, [JSON](#providing-a-json-configuration-file) or both.
674
+
675
+ ```html
676
+ <link href="/admin/config.yml" type="application/yaml" rel="cms-config-url" />
677
+ <link href="/admin/collections/authors.yml" type="application/yaml" rel="cms-config-url" />
678
+ <link href="/admin/collections/pages.yml" type="application/yaml" rel="cms-config-url" />
679
+ <link href="/admin/collections/posts.yml" type="application/yaml" rel="cms-config-url" />
680
+ ```
681
+
682
+ Both standard `application/yaml` and non-standard `text/yaml` are acceptable for the YAML config link `type`.
683
+
684
+ Limitation: YAML anchors, aliases and merge keys only work if they are in the same file, as files are merged with the [`deepmerge`](https://www.npmjs.com/package/deepmerge) library after being parsed as separate JavaScript objects.
685
+
668
686
  ### Working around an authentication error
669
687
 
670
688
  If you get an “Authentication Aborted” error when trying to sign in to GitHub or GitLab using the authorization code flow, you may need to check your site’s [`Cross-Origin-Opener-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy). The COOP header is not widely used, but it’s known to break the OAuth flow with a popup window. If that’s your case, changing `same-origin` to `same-origin-allow-popups` solves the problem. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/131))
@@ -907,7 +925,7 @@ collections:
907
925
  slug: '{{uuid_short}}' # or {{uuid}} or {{uuid_shorter}}
908
926
  ```
909
927
 
910
- ### Configure multiple media libraries
928
+ ### Configuring multiple media libraries
911
929
 
912
930
  The traditional [`media_library`](https://decapcms.org/docs/configuration-options/#media-library) option allows developers to configure only one media library:
913
931
 
@@ -918,20 +936,25 @@ media_library:
918
936
  max_file_size: 1024000
919
937
  ```
920
938
 
921
- Sveltia CMS has added support for multiple media libraries with the new `media_libraries` option. It can be used as a global option as well as a File/Image field option.
939
+ Sveltia CMS has added support for multiple media libraries with the new `media_libraries` option so you can mix up the default media library (your repository), [Cloudinary](https://decapcms.org/docs/cloudinary/) and [Uploadcare](https://decapcms.org/docs/uploadcare/). The new option can be used as a global option as well as a File/Image field option.
922
940
 
923
941
  ```yaml
924
942
  media_libraries:
925
943
  default:
926
944
  config:
927
945
  max_file_size: 1024000
946
+ # coming soon: image optimizer options
928
947
  cloudinary:
929
948
  config:
930
- cloud_name: your_cloud_name
931
- api_key: your_api_key
949
+ cloud_name: YOUR_CLOUD_NAME
950
+ api_key: YOUR_API_KEY
951
+ output_filename_only: true
932
952
  uploadcare:
933
953
  config:
934
- publicKey: YOUR_UPLOADCARE_PUBLIC_KEY
954
+ publicKey: YOUR_PUBLIC_KEY
955
+ settings:
956
+ autoFilename: true
957
+ defaultOperations: '/resize/800x600/'
935
958
  ```
936
959
 
937
960
  ### Editing data files with a top-level list
@@ -1171,7 +1194,6 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1171
1194
  - Developer documentation (implementation guide)
1172
1195
  - Marketing site
1173
1196
  - Live demo site
1174
- - Automated unit test coverage (Vitest)
1175
1197
 
1176
1198
  ### After the 1.0 release
1177
1199
 
@@ -1187,7 +1209,6 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1187
1209
  - Marketplace for custom widgets, etc.
1188
1210
  - VS Code extension for `config.yml` schema validation
1189
1211
  - Official starter templates for the most popular frameworks, including SvelteKit and Next.js
1190
- - Automated E2E test coverage (Playwright)
1191
1212
  - and so much more!
1192
1213
 
1193
1214
  ## Related links
@@ -1594,3 +1615,7 @@ This software is provided “as is” without any express or implied warranty. W
1594
1615
  [^194]: Netlify/Decap CMS [#7157](https://github.com/decaporg/decap-cms/issues/7157)
1595
1616
 
1596
1617
  [^195]: Netlify/Decap CMS [#5901](https://github.com/decaporg/decap-cms/issues/5901)
1618
+
1619
+ [^196]: Netlify/Decap CMS [#3057](https://github.com/decaporg/decap-cms/issues/3057) — We use Svelte though.
1620
+
1621
+ [^197]: Netlify/Decap CMS [#3457](https://github.com/decaporg/decap-cms/issues/3457), [#3624](https://github.com/decaporg/decap-cms/issues/3624)