Why is page params key lowercase?

I can’t speak to why the key is lowercased now (I’m sure there was much thought put into the decision).


But, you can easily achieve what you want by organizing your params a bit differently – use an array of objects:

{
  "references" : [
    {
      "title" : "Some Title",
      "url" : "https://example.com"
    },
    {
      "title" : "Some Title",
      "url" : "https://example.com"
    },
    {
      "title" : "Some Title",
      "url" : "https://example.com"
    }
  ]
}

Then in your template:

<ul>
{{ range .Params.references }}
  <li><a href="{{ .url }}" target="_blank" rel="nofollow">{{ .title }}</a></li>
{{ end }}
</ul>
5 Likes