Hello,
I have the following which doesn’t throw an error but unfortunately doesn’t work. It attempts to:
- Loop through all the instances of a front matter variable
- Cast it to float
- Total all the values
I just can’t figure out how to do this in Go. Is there a += variable assignment mechanism?
{{ $currenttotal := 0 }}
{{ range where .Pages "Status" "eq" "completed" }}
{{ $durationvalue := (float .Params.duration) }}
{{ $currenttotal := (add $currenttotal $durationvalue) }}
{{ end }}
{{ $currenttotal }}