Hey guys I’m trying to range some quotes I have in .Site.Data.quotes
where each quote is a toml file and I’m having some issues.
This is what my range looks like:
{{range $index, $value := .Site.Data.quotes}}
{{$index}} - {{$value.name}}
{{if eq $index 0}}
<a href="#{{$value.name | urlize}}" class="active outline-circle-link"></a>
{{else}}
<a href="#{{$value.name | urlize}}" class="outline-circle-link"></a>
{{end}}
{{end}}
Now here is my issue when I render index it is giving me thee toml file name instead of the actual index value of the array, what am I doing wrong?
Thanks.