There is no requirement in YAML to indent any concrete number of spaces. There is also no requirement to be consistent. So for example, this is valid YAML:
a:
b:
- c
- d
- e
f:
"ghi"
Some rules might be of interest:
- Flow content (i.e. everything that starts with
{
or [
) can span multiple lines, but must be indented at least as many spaces as the surrounding current block level.
- Block list items can (but don't need to) have the same indentation as the surrounding block level because
-
is considered part of the indentation:
a: # top-level key
- b # value of that key, which is a list
- c
c: # next top-level key
d # non-list value which must be more indented
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…