Before v0.55: {{ .Hugo.Version }}
works file in locale files i18n.*.yaml
. However, .Hugo
is deprecated since v0.55, so what can one use?
I tried {{ hugo.Version }}
. This worked fine in Go-HTML template files, but Hugo can’t parse that in YAML files.
Error: "/home/vin100/beautifulhugo/i18n/ru.yaml:1:1": failed to load translations: unable to parse translation #14 because template: На базе <a href="http://gohugo.io">Hugo v{{ hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>:1: function "hugo" not defined
map[id:poweredBy translation:На базе <a href="http://gohugo.io">Hugo v{{ hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>]
P.S. I’m using Beautiful Hugo