v0.53
From all of us to all of you, a very Merry Christmas -- and Hugo 0.53
!
The main new features in this release are:
- You can now split your configuration into directories per environment. Hugo did support multiple configuration files before this release, but it was hard to manage for bigger sites, especially those with multiple languages. With this we have also formalized the concept of an
environment
; the defaults areproduction
(when runninghugo
) ordevelopment
(when runninghugo server
) but you can create any environment you like. We will update the documentation, but all the details are in this issue. Also, see this PR for how the refactored configuration for the Hugo website looks like. transform.Unmarshal
(see the documentation is a new and powerful template function that can turnResource
objects or strings with JSON, TOML, YAML or CSV into maps/arrays.- Two new global variables in
site
andhugo
.hugo
gives you version info etc. ({{ hugo.Version }}
,{{ hugo.Environment }}
), but thesite
is probably more useful, as it allows you to access the current site's variables (e.g.{{ site.RegularPages }}
) without any context (or ".").
This version is also the fastest to date. A site building benchmark shows around 10% faster, but that depends on the site. The important part here is that we're not getting slower. It’s quite a challenge to consistently add significant new functionality and simultaneously improve performance. It's like not gaining weight during Christmas. We also had a small performance boost in version 0.50
. A user then reported that his big and complicated site had a 30% reduction in build time. This is important to us, one of the core features. It's in the slogan: "The world’s fastest framework for building websites."
This release represents 37 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 @moorereason, @coliff, and @jfyuen for their ongoing contributions. And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 19 contributions by 8 contributors. A special thanks to @bep, @kaushalmodi, @peaceiris, and @moorereason for their work on the documentation site.
Hugo now has:
- 31174+ stars
- 441+ contributors
- 279+ themes
Notes
- The
hugo benchmark
command is removed - We now do not publish transformed inline resources, e.g. minified CSS only accessed via
.Content.
, e.g.{{ ($css | minify).Content }}
. Before this version, the minified CSS in that example would be copied to/public
, which was never the intention. If you want that, you need to access either.RelPermalink
or.Permalink
.
Enhancements
Templates
- Include options in cache key be58c7b9 @bep #5555
- Simplify transform.Unmarshal func 094709e1 @bep #5428
- Add transform.Unmarshal func 822dc627 @bep #5428
- Remove "double layout" lookup d5a0b6bb @bep #5390
- Add reflect namespace c84f506f @moorereason #4081
- Use the correct Hugo var 931a1324 @bep #5467
- Add tpl/site and tpl/hugo 831d23cb @bep #5470#5467#5503
- Add godoc packages comments 30a7c9ea @moorereason
Core
- Adjust test 25ddbb09 @bep #5544
- Add .Name as a shortcode variable 10217144 @bep #5546
- Improve logic of output path trimming 0483299b @moorereason #4666
- Enable Emoji in site benchmark 4d93aca2 @bep
- Restore taxonomy term path separation 9ce0a1fb @bep #5513
- Add .Site.Sites 83783588 @bep #5504
Other
- Adjust CSV example 62d031ae @bep #5555
- Rename CSV option from comma to delimiter ce06bdb1 @bep #5555
- Document transform.Unmarshal 2efc1a64 @bep #5556
- Regenerate CLI docs e691c48a @bep #5544
- Add CSV support to transform.Unmarshal a5744697 @bep #5555
- Prevent resource publishing for transformed inline resources 43f9df01 @bep #4944
- Remove the benchmark command 35bfca3b @bep #5543
- Move the emoji parsing to pageparser 9cd54cab @bep #5534
- Split the page lexer into some more files a8853f1c @bep #5534
- parser/pageparser: Add a benchmark f2167de8 @bep
- Update to Go 1.11.4 bb9c2988 @bep #5524
- Simplify implementation f7691fe9 @bep
- Support unquoted URLs in canonifyURLs replacer efe0b4e5 @bep #5529
- Regenerate CLI docs 50686817 @bep #5507
- Add /config dir support 78294740 @bep #5422
- cache/filecache: Simplify test 514e18dc @bep #5497
- Use OS fs for test b804a708 @bep #5497
Fixes
Templates
Other
- Fix "failed to create file caches from configuration: file exists" on Windows 5178cd13 @bep #5497
- fix jekyll import highlight options ab921476 @jfyuen
- Fix "always false" condition 25641891 @Quasilyte
- Fixx CSS2 color code handling 4b5f7439 @bep #5506
- common/collections: Fix defines typo 83468481 @coliff