@sveltia/cms 0.87.4 → 0.88.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
@@ -78,6 +78,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
78
78
  - [Configuring multiple media libraries](#configuring-multiple-media-libraries)
79
79
  - [Optimizing images for upload](#optimizing-images-for-upload)
80
80
  - [Disabling stock assets](#disabling-stock-assets)
81
+ - [Editing site deployment configuration files](#editing-site-deployment-configuration-files)
81
82
  - [Editing data files with a top-level list](#editing-data-files-with-a-top-level-list)
82
83
  - [Changing the input type of a DateTime field](#changing-the-input-type-of-a-datetime-field)
83
84
  - [Rendering soft line breaks as hard line breaks in Markdown](#rendering-soft-line-breaks-as-hard-line-breaks-in-markdown)
@@ -112,7 +113,7 @@ Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successo
112
113
  - **Sveltia CMS**: not a fork but a **complete rewrite** or “total reboot”, started in November 2022, first appeared on GitHub in March 2023
113
114
  - [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 stagnant, with only occasional releases
114
115
 
115
- Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt, and numerous bugs of Netlify CMS, which was launched in 2015. Our product is better by design: We have rebuilt the app from the ground up using a [modern framework](https://svelte.dev/) while closely monitoring and analyzing the Netlify/Decap CMS issue tracker. We don’t use any of the predecessor’s code. This allows us to make [hundreds of improvements](#differentiators) without getting stuck in the old system.
116
+ Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt, and numerous bugs of Netlify CMS, which was launched in 2015. Our product is better by design: We have rebuilt the app from the ground up using a [modern framework](https://svelte.dev/) while closely monitoring and analyzing the predecessor’s issue tracker. We don’t use any of their code. This allows us to make [hundreds of improvements](#differentiators) without getting stuck in an old system.
116
117
 
117
118
  While Sveltia CMS was created to replace legacy Netlify CMS instances, it can also be used as an alternative to other Netlify CMS successors. With its [solid i18n support](#better-i18n-support), we’re hoping our product will eventually be an appearing option for anyone looking for a free headless CMS.
118
119
 
@@ -132,7 +133,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
132
133
 
133
134
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
134
135
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
135
- - So far, 230+ issues, or 470+ if including duplicates, have been effectively solved in Sveltia CMS (Yes, you read it right)
136
+ - So far, 230+ issues, or 475+ if including duplicates, have been effectively solved in Sveltia CMS (Yes, you read it right)
136
137
  - Target:
137
138
  - 250 issues, or 500 if including duplicates, by GA — Almost there!
138
139
  - 400 issues, or 800 if including duplicates, in the future 💪
@@ -319,12 +320,14 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
319
320
  - The `date` transformation supports the time zone argument. The only available value is `utc`, which converts a date to UTC. This is useful if the specified DateTime field is local, but you want to force UTC in the entry slug, e.g. `{{date | date('YYYYMMDD-HHmm', 'utc')}}`. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/278#issuecomment-2565313420))
320
321
  - The `date` transformation returns an empty string if an invalid date is given.[^176]
321
322
  - Multiple transformations can be chained like `{{title | upper | truncate(20)}}`.
322
- - Sveltia CMS supports [singletons](#using-singletons), a simple form of a file collection.[^233]
323
+ - Enhancements to file collections:
324
+ - Sveltia CMS supports [singletons](#using-singletons), a simple form of a file collection.[^233]
325
+ - File collections support files without extensions.[^255] This is useful for [editing site deployment configuration files](#editing-site-deployment-configuration-files), such as `_headers` and `_redirects`.
326
+ - Each file in a file collection has the `format` and `frontmatter_delimiter` options, which can be used to specify the file format, making it possible to have `yaml-frontmatter`, `toml-frontmatter` and `json-frontmatter` side by side.[^218]
323
327
  - The collection `label` defaults to the `name` value according to the [Decap CMS document](https://decapcms.org/docs/configuration-options/#collections), while Netlify/Decap CMS actually throws a configuration error if the `label` option is omitted.
324
328
  - Nested fields (dot notation) can be used in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`.[^62]
325
329
  - Markdown is supported in the `description` collection option.[^79] Bold, italic, strikethrough, code and links are allowed.
326
330
  - The collection `folder` can be an empty string (or `.` or `/`) if you want to store entries in the root folder. This supports a typical VitePress setup.
327
- - Each file in a file collection has the `format` and `frontmatter_delimiter` options, which can be used to specify the file format, making it possible to have `yaml-frontmatter`, `toml-frontmatter` and `json-frontmatter` side by side.[^218]
328
331
  - Entry slugs
329
332
  - It’s possible to [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug).
330
333
  - Slug generation is fail-safe: If a slug cannot be determined from entry content, part of a random UUID is used instead of throwing an error or filling in with arbitrary string field values.[^133]
@@ -372,6 +375,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
372
375
  - The Preview Pane comes with a minimal default style.[^168] It looks nice without a custom preview style or template.
373
376
  - For better performance, the Preview Pane doesn’t use an `<iframe>`.[^179]
374
377
  - The Preview Pane displays all fields, including each label, making it easier to see which fields are populated.
378
+ - Entering a long value into a field will not cause the field label to disappear.[^254]
375
379
  - Clicking a field in the Preview Pane focuses the corresponding field in the Edit Pane.[^41] It automatically expands when collapsed.
376
380
  - This is equivalent to the (misleading) visual editing feature introduced in [Decap CMS 3.6.0](https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.6.0), but our click-to-highlight feature is enabled by default; you don’t need to opt in with the `editor.visualEditing` collection option.
377
381
  - Our implementation doesn’t cause a module import error[^225] or broken image previews.[^188]
@@ -397,7 +401,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
397
401
 
398
402
  ### Better widgets
399
403
 
400
- Sveltia CMS supports all [built-in widgets](https://decapcms.org/docs/widgets/) available in Netlify/Decap CMS. We have made significant improvements to these widgets while adding some new ones. Support for [custom widgets](https://decapcms.org/docs/custom-widgets/) will be added before the 1.0 release.
404
+ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widgets/) available in Netlify/Decap CMS. We have improved these widgets significantly while adding some new ones. A few remaining [limitations](#current-limitations) will be addressed before the 1.0 release.
401
405
 
402
406
  - Boolean
403
407
  - A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error.[^45]
@@ -663,6 +667,7 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
663
667
  ### Other notes
664
668
 
665
669
  - Sveltia CMS requires a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts), meaning it only works with HTTPS, `localhost` or `127.0.0.1` URLs. If you’re running a remote server yourself and the content is served over HTTP, get a TLS certificate from [Let’s Encrypt](https://letsencrypt.org/).
670
+ - Some options added during the beta period may be changed or removed when the product reaches GA. While we’ll try to minimize breaking changes, please be aware that some of your configuration may need to be updated.
666
671
 
667
672
  ## Getting started
668
673
 
@@ -1203,6 +1208,37 @@ media_libraries:
1203
1208
  providers: []
1204
1209
  ```
1205
1210
 
1211
+ ### Editing site deployment configuration files
1212
+
1213
+ Sveltia CMS allows users to edit files without extensions. Examples include `_headers` and `_redirects`, which are used by some static site hosting providers, such as [Netlify](https://docs.netlify.com/routing/redirects/), [GitLab Pages](https://docs.gitlab.com/user/project/pages/redirects/) and [Cloudflare Pages](https://developers.cloudflare.com/pages/configuration/redirects/). Since the `body` field is saved without the field name when using the default `yaml-frontmatter` format, you can use the following configuration to edit these files in the Content Editor:
1214
+
1215
+ ```yaml
1216
+ collections:
1217
+ - name: config
1218
+ label: Site Configuration
1219
+ editor:
1220
+ preview: false
1221
+ files:
1222
+ - name: headers
1223
+ label: Headers
1224
+ file: static/_headers # The path varies by framework
1225
+ fields:
1226
+ - name: body
1227
+ label: Headers
1228
+ widget: code # Can also be `text`
1229
+ output_code_only: true
1230
+ allow_language_selection: false
1231
+ - name: redirects
1232
+ label: Redirects
1233
+ file: static/_redirects # The path varies by framework
1234
+ fields:
1235
+ - name: body
1236
+ label: Redirects
1237
+ widget: code # Can also be `text`
1238
+ output_code_only: true
1239
+ allow_language_selection: false
1240
+ ```
1241
+
1206
1242
  ### Editing data files with a top-level list
1207
1243
 
1208
1244
  Sveltia CMS allows you to edit and save a list at the top-level of a data file, without a field name. All you need to do is create a single List field with the new `root` option set to `true`. The configuration below reproduces [this Jekyll data file example](https://jekyllrb.com/docs/datafiles/#example-list-of-members):
@@ -1392,7 +1428,7 @@ Then, add the following origins depending on your Git backend and enabled integr
1392
1428
  ```
1393
1429
  https://gitea.com
1394
1430
  ```
1395
- - OpenStreetMap (built-in Map widget)
1431
+ - OpenStreetMap: (used in the built-in Map widget)
1396
1432
  - `img-src`
1397
1433
  ```
1398
1434
  https://*.openstreetmap.org
@@ -1484,6 +1520,8 @@ See [Contributing to Sveltia CMS](https://github.com/sveltia/sveltia-cms/blob/ma
1484
1520
 
1485
1521
  ## Roadmap
1486
1522
 
1523
+ The list below gives you an idea of what we are working on and what we plan to implement in the future. It is not a complete list of all issues, but rather a summary of the most important features and improvements. Things may change as we progress, so please check back regularly.
1524
+
1487
1525
  ### v1.0
1488
1526
 
1489
1527
  Due late 2025
@@ -1520,6 +1558,7 @@ Due early 2026
1520
1558
 
1521
1559
  - Tackling many of the remaining Netlify/Decap CMS issues, including MDX support,[^122] [manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214),[^125] [config editor](https://github.com/sveltia/sveltia-cms/discussions/452),[^10] offline support,[^238] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) (some of them may be included in v2.0)
1522
1560
  - **Sveltia CMS Additions**: edge functions providing features that require server-side implementation, including user management (Netlify Identity alternative), roles,[^23] commits without a Git service account (Git Gateway alternative), API key management, post locking (like [WordPress](https://codex.wordpress.org/Post_Locking))[^166] and scheduled posts[^167]
1561
+ - View, compare and restore revisions (like [WordPress](https://wordpress.com/support/page-post-revisions/))
1523
1562
  - More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools, etc.
1524
1563
  - AI integrations for image generation, content writing, translation, etc.
1525
1564
  - Search enhancements
@@ -1691,7 +1730,7 @@ This software is provided “as is” without any express or implied warranty. W
1691
1730
 
1692
1731
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
1693
1732
 
1694
- [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531)
1733
+ [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531), [#7535](https://github.com/decaporg/decap-cms/issues/7535)
1695
1734
 
1696
1735
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
1697
1736
 
@@ -2052,3 +2091,7 @@ This software is provided “as is” without any express or implied warranty. W
2052
2091
  [^252]: Netlify/Decap CMS [#6629](https://github.com/decaporg/decap-cms/issues/6629)
2053
2092
 
2054
2093
  [^253]: Netlify/Decap CMS [#6635](https://github.com/decaporg/decap-cms/issues/6635), [#7006](https://github.com/decaporg/decap-cms/issues/7006), [#7311](https://github.com/decaporg/decap-cms/issues/7311)
2094
+
2095
+ [^254]: Netlify/Decap CMS [#7532](https://github.com/decaporg/decap-cms/issues/7532)
2096
+
2097
+ [^255]: Netlify/Decap CMS [#7355](https://github.com/decaporg/decap-cms/discussions/7355)