@sveltia/cms 0.66.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)
@@ -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
@@ -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), including custom dialogs,[^196] 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,14 @@ 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
- - Also supports [multiple configuration files](#providing-multiple-configuration-files).[^197]
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]
215
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.
216
218
 
217
219
  ### Better backend support
@@ -560,7 +562,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
560
562
  - The `default` option for sortable fields is [implemented in Sveltia CMS](#specifying-default-sort-field-and-direction).
561
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))
562
564
  - The `logo_link` global option will not be supported. Use `display_url` or `site_url` instead.
563
- - 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.
564
566
  - I18n support
565
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]`.
566
568
  - Widgets
@@ -585,7 +587,7 @@ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/
585
587
 
586
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.
587
589
 
588
- 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.
589
591
 
590
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.)
591
593
 
@@ -668,7 +670,7 @@ Alternatively, you can [manually initialize](https://decapcms.org/docs/manual-in
668
670
 
669
671
  ### Providing multiple configuration files
670
672
 
671
- 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 tag appearance using the [`deepmerge`](https://www.npmjs.com/package/deepmerge) library. It’s possible to use YAML, [JSON](#providing-a-json-configuration-file) or both.
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.
672
674
 
673
675
  ```html
674
676
  <link href="/admin/config.yml" type="application/yaml" rel="cms-config-url" />
@@ -677,6 +679,10 @@ With Sveltia CMS, developers can modularize the site configuration. Just provide
677
679
  <link href="/admin/collections/posts.yml" type="application/yaml" rel="cms-config-url" />
678
680
  ```
679
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
+
680
686
  ### Working around an authentication error
681
687
 
682
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))
@@ -930,7 +936,7 @@ media_library:
930
936
  max_file_size: 1024000
931
937
  ```
932
938
 
933
- 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/). 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.
934
940
 
935
941
  ```yaml
936
942
  media_libraries:
@@ -1188,7 +1194,6 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1188
1194
  - Developer documentation (implementation guide)
1189
1195
  - Marketing site
1190
1196
  - Live demo site
1191
- - Automated unit test coverage (Vitest)
1192
1197
 
1193
1198
  ### After the 1.0 release
1194
1199
 
@@ -1204,7 +1209,6 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1204
1209
  - Marketplace for custom widgets, etc.
1205
1210
  - VS Code extension for `config.yml` schema validation
1206
1211
  - Official starter templates for the most popular frameworks, including SvelteKit and Next.js
1207
- - Automated E2E test coverage (Playwright)
1208
1212
  - and so much more!
1209
1213
 
1210
1214
  ## Related links
@@ -1612,6 +1616,6 @@ This software is provided “as is” without any express or implied warranty. W
1612
1616
 
1613
1617
  [^195]: Netlify/Decap CMS [#5901](https://github.com/decaporg/decap-cms/issues/5901)
1614
1618
 
1615
- [^196]: Netlify/Decap CMS [#3057](https://github.com/decaporg/decap-cms/issues/3057)
1619
+ [^196]: Netlify/Decap CMS [#3057](https://github.com/decaporg/decap-cms/issues/3057) — We use Svelte though.
1616
1620
 
1617
1621
  [^197]: Netlify/Decap CMS [#3457](https://github.com/decaporg/decap-cms/issues/3457), [#3624](https://github.com/decaporg/decap-cms/issues/3624)