v0.51.0
- Added new data output options:
- JSON indent style and size
- YAML indent size
- This effectively solves decaporg/decap-cms#5870.
- YAML string value quote
- The
yaml_quote
collection option added in v0.5.10 is now deprecated and will be removed in v1.0.0.yaml_quote: true
is equivalent toquote: double
for the newyaml
option.
- The
omit_empty_optional_fields
- Sveltia CMS always saves proper values, such as an empty string, an empty array or
null
, instead of nothing (undefined
), regardless of therequired
field option. The new option allows developers to change the behaviour so that all empty optional fields are omitted from the output. This is useful if you have data type validations that expectundefined
. - This solves #241 and effectively solves decaporg/decap-cms#995, decaporg/decap-cms#2017, decaporg/decap-cms#7120 and decaporg/decap-cms#7186.
- Sveltia CMS always saves proper values, such as an empty string, an empty array or
- Improved the Number widget:
- If the
value_type
option isint
(default) orfloat
, therequired
option isfalse
, and the value is not entered, the field will now be saved asnull
(orundefined
if theomit_empty_optional_fields
option istrue
) instead of an empty string. Ifvalue_type
is something else, the data type remains string. - This effectively solves decaporg/decap-cms#2007 and decaporg/decap-cms#2848.
- If the
Full Changelog: v0.50.1...v0.51.0