Tables and math, from nested front matter

Written from my phone so please forgive terseness.

I would get your total like so:

{{ $total := 0 }}
{{ range .Params.fee }}
  {{ $line_total := mul .cost .quantity }}
  {{ $total = add $total $line_total }}
{{ end }}
2 Likes