This One Goes to 11!
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:
- 28275+ stars
- 441+ contributors
- 252+ themes
Enhancements
- Add a test for template variable overwrite 0c8a4154 @bep
- Include language code in REF_NOT_FOUND errors 94d0e79d @bep #5110
- Improve minifier MIME type resolution ebb56e8b @bep #5093
- Update to Go 1.11 6b9934a2 @bep #5115
- Set GO111MODULE=on for mage install c7f05779 @bep #5115
- Add instruction to install PostCSS when missing 08d14113 @anthonyfok #5111
- Update snapcraft build config to Go 1.11 94d6d678 @bep #5115
- Use Go 1.11 modules with Mage 45c9c45d @bep #5115
- Add go.mod fce32c07 @bep #5115
- Update Travis to Go 1.11 and Go 1.10.4 d32ff16f @bep #5115
- Skip installing postcss due to failure on build server 66f688f7 @anthonyfok
Fixes
Улучшить эту страницу