You can use printf:
https://github.com/bep/bepsays.com/blob/master/layouts/partials/menu.ace#L20
The example looks weird, but works. Search for printf in this doc:
http://golang.org/pkg/text/template/
Also, if you want you use $path
outside of the range – in the upcoming Huog release (or build from source), there is Scratch
:
https://github.com/spf13/hugo/blob/master/docs/content/extras/scratch.md