Provide option to set number of spaces for indentation when Netlify CMS saves a .yml file #5870
Labels
area: configuration
area: formats
good first issue
type: feature
code contributing to the implementation of a feature and/or user facing functionality
I tried googling for this issue and found absolutely nothing, so i am opening up an issue.
The problem
We use two ways of editing the content of our website:
Because as a team we agreed on using 4 spaces for indentation (and prettier auto-formats this every time we save a file), and because Netlify CMS seems to use 2 spaces, everytime someone edits a .yml file in an editor the entire indentation of the file is set to 4, leading the entire file to be seen by git as "changed", which leads to quite unreadable git diffs.
Proposed solution:
Adding an optional key/value pair in the netlify.toml config file where you can override the default number of spaces. This would be a non-breaking change cause existing projects still would continue to use 2 spaces, and we can set it to 4 :)
Is this possible? What do you think about this idea?
Thanks in advance!
The text was updated successfully, but these errors were encountered: