@sveltia/cms 0.87.4 → 0.88.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
@@ -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)
@@ -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 💪
@@ -320,6 +321,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
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
323
  - Sveltia CMS supports [singletons](#using-singletons), a simple form of a file collection.[^233]
324
+ - A file collection supports files without extensions.[^255] This is useful for [editing site deployment configuration files](#editing-site-deployment-configuration-files), such as `_redirects` and `_headers`.
323
325
  - 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
326
  - Nested fields (dot notation) can be used in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`.[^62]
325
327
  - Markdown is supported in the `description` collection option.[^79] Bold, italic, strikethrough, code and links are allowed.
@@ -372,6 +374,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
372
374
  - The Preview Pane comes with a minimal default style.[^168] It looks nice without a custom preview style or template.
373
375
  - For better performance, the Preview Pane doesn’t use an `<iframe>`.[^179]
374
376
  - The Preview Pane displays all fields, including each label, making it easier to see which fields are populated.
377
+ - Field labels will not disappear when a long value is entered into the fields.[^254]
375
378
  - Clicking a field in the Preview Pane focuses the corresponding field in the Edit Pane.[^41] It automatically expands when collapsed.
376
379
  - 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
380
  - Our implementation doesn’t cause a module import error[^225] or broken image previews.[^188]
@@ -663,6 +666,7 @@ Sveitia CMS works with all modern browsers, but there are a few limitations beca
663
666
  ### Other notes
664
667
 
665
668
  - 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/).
669
+ - 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
670
 
667
671
  ## Getting started
668
672
 
@@ -1203,6 +1207,37 @@ media_libraries:
1203
1207
  providers: []
1204
1208
  ```
1205
1209
 
1210
+ ### Editing site deployment configuration files
1211
+
1212
+ 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 a field name when using the default `yaml-frontmatter` format, you can use the following configuration to edit these files in the Content Editor:
1213
+
1214
+ ```yaml
1215
+ collections:
1216
+ - name: config
1217
+ label: Site Configuration
1218
+ editor:
1219
+ preview: false
1220
+ files:
1221
+ - name: headers
1222
+ label: Headers
1223
+ file: static/_headers # The path varies by framework
1224
+ fields:
1225
+ - name: body
1226
+ label: Headers
1227
+ widget: code
1228
+ output_code_only: true
1229
+ allow_language_selection: false
1230
+ - name: redirects
1231
+ label: Redirects
1232
+ file: static/_redirects # The path varies by framework
1233
+ fields:
1234
+ - name: body
1235
+ label: Redirects
1236
+ widget: code
1237
+ output_code_only: true
1238
+ allow_language_selection: false
1239
+ ```
1240
+
1206
1241
  ### Editing data files with a top-level list
1207
1242
 
1208
1243
  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):
@@ -2052,3 +2087,7 @@ This software is provided “as is” without any express or implied warranty. W
2052
2087
  [^252]: Netlify/Decap CMS [#6629](https://github.com/decaporg/decap-cms/issues/6629)
2053
2088
 
2054
2089
  [^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)
2090
+
2091
+ [^254]: Netlify/Decap CMS [#7532](https://github.com/decaporg/decap-cms/issues/7532)
2092
+
2093
+ [^255]: Netlify/Decap CMS [#7355](https://github.com/decaporg/decap-cms/discussions/7355)