Why are page params lowercase?

I am making a site with travel diaries, grouped by trip. Each page includes a param with the trip name. I then group the articles by page param (in this case it is the trip name, like +++ trip= “Trip to the USA” +++).

When I list my articles, I group them by trip like so:

{{ range .Data.Pages.ByDate.GroupByParam "trip" }}

The output is in lowercase, and I found that the docs mention this “All Params are only accessible using all lowercase characters”. Why is this so? How can I specify the trip name in my case, and have it displayed correctly? Should I do something else, than write the trip name as a param?

I think (hope!) you misunderstand this.

A Param is a key and a value. The value is of course preserved as is.

In your case

trip = the key
Trip to the USA = the value

Thanks for the quick response. I hope I misunderstood something :slight_smile:

Here is a screenshot that illustrates the issue, first is the frontmatter, then my template, then the result.
As you see, the value of the key is in sentence case, the output, however, is lowercase. This is not a CSS or Javascript issue, it outputs lowercase even with styles and JS turned off.

1 Like

Just to be clear: The param values themselves are not lowercased, it’s when they are used as key in GroupByParam this happens.

Yes, I got that from the GitHub comments. The same value shows fine in another place where Group is not used (inside the document). Thanks for the quick reaction and answers :slight_smile: You guys are awesome!

A post was split to a new topic: Why is page params key lowercase?