Why is page params key lowercase?

https://github.com/spf13/viper – the library we use for configuration – does this.

The reasons are:

  • So we can do case insensitive lookups, .Param "Abra.Kadabra vs .Param "abra.kadabra
  • So we can merge configurations from different sources with potentially different case semantics (OS env vars are all upper case)

In short, you should not put data in your map keys in front matter or config data. But note that you can also put data files inside /data.

3 Likes