Hello,
First post here from a newbie. Generally learning Hugo and it’s great.
But… I’m running into some problems and I’m clueless about this one.
I was roughly following the guide for Jaco Pastorius discography from https://gohugo.io/templates/data-templates/
The example worked, but I wanted something different.
Instead of discography, I’ve put some basic data into each bass player data file (TOML), like so:
name = John guitar = Gibson
So then in my partial, instead of using range
for the discography, I simply wanted to display the name and the guitar brand, like so:
<p>{{ .name }}: {{ .guitar }}</p>
Well, turns out this doesn’t work!
After 1 hour of panic googling and browsing this forum, I just tried to capitalise the “name” in both data file and the partial, and… it worked.
Could anyone clarify why I need to use capitalisation?
Where in the docs is this specified?
Why I don’t have to capitalise the “guitar”?
Cheers
(capitalize capitalization)