hugo/docs/content/en/news/0.48-relnotes/index.md

5.2 KiB


date: 2018-08-29 title: "This One Goes to 11!" description: "With Go 1.11, Hugo finally gets support for variable overwrites in templates!" categories: ["Releases"]

Hugo 0.48 is built with the brand new Go 1.11. On the technical side this means that Hugo now uses Go Modules for the build. The big new functional thing in Go 1.11 for Hugo is added support for variable overwrites. This means that you can now do this and get the expected result:

{{ $var := "Hugo Page" }}
{{ if .IsHome }}
	{{ $var = "Hugo Home" }}
{{ end }}
Var is {{ $var }}

The above may look obvious, but has not been possible until now. In Hugo we have had .Scratch as a workaround for this, but Go 1.11 will help clean up a lot of templates.

This release represents 23 contributions by 5 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @anthonyfok, @vsopvsop, and @moorereason for their ongoing contributions. And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.

Many have also been busy writing and fixing the documentation in hugoDocs, which has received 15 contributions by 12 contributors. A special thanks to @bep, @kaushalmodi, @regisphilibert, and @anthonyfok for their work on the documentation site.

Hugo now has:

Enhancements

Fixes