I am just beginning with Hugo and Go. I want to do a pretty simple thing and can’t figure it out. In a list page – I want to style pages with “link” tag differently. How to select the pages that have a specific tag. I tried to do it this way:
{{range .Pages}}
{{ $tag := .Params.Tags }}
{{ if eq $tag "link" }}
<p>Print something else</p>
<hr>
{{else}}
<h3><a href="{{.URL}}">{{.Title}}</a></h3>
{{.Content}}
<p>{{.Params.tags}}</p>
<p>{{.Params.types}}</p>
<hr>
{{end}}
{{end}}
Variables are super confusing. I don’t understand what the dot {{.}} is doing. Why sometimes you should capitalize the first letter why sometimes you shouldn’t. I went through Giraffe Academy tutorials and read some documentation. Is there a good place for me to learn this give that I am new to the frontend world?