decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

The keys in the generated JSON content are unordered

Open liby opened this issue 1 year ago • 1 comments

Describe the bug

The keys in the generated JSON content are unordered.

To Reproduce

https://github.com/liby/decap-cms-field-sort-issue#reproduction-steps

Expected behavior

The keys are sorted in alphabetical order from A-Z or as described in the document:

The fields option maps editor UI widgets to field-value pairs in the saved file. The order of the fields in your Decap CMS config.yml file determines their order in the editor UI and in the saved file.

Screenshots

image

Applicable Versions:

  • Decap CMS version: 3.0.0
  • Git provider: GitHub
  • OS: macOS 13.5.1 (22G90)
  • Browser version: Chrome 116.0.5845.140
  • Node.JS version: 18.17.0

CMS configuration

https://github.com/liby/decap-cms-field-sort-issue/blob/main/admin/config.yml

Additional context

Possible relevant discussions.

liby avatar Sep 04 '23 11:09 liby

@liby you're onto something. I think this was raised before but I can't find the relevant issue.

martinjagodic avatar Oct 20 '23 09:10 martinjagodic