I’m posting this here because I’ve encountered a bizarre issue with front matter parameters being rendered in a random order and not as I typed them.
It took a while before I discovered that non-latin line breaks (in this case greek) were causing this weirdness.
So if you ever encounter this behavior just eliminate the non-latin line break and type it again in english (or another language that uses the latin alphabet).
And just for reference’s sake my nested YAML parameters look like this:
--- color: grey: γκρι ecru: εκρού saumon: σομόν gold: χρυσό ---
And I am rendering them with the following function.
{{- range $key, $value := $.Params.color -}}...{- end -}}
I don’t think this is a Hugo bug. It looks more like a YAML bug.
Oh and TOML doesn’t even support this kind of syntax -at least as far as I can tell-.
EDIT
As pointed out this is a Go feature and the above was a temporary fix. Everything is random again. Lucky me.