Hugo 0.59.0
The timing of this release is motivated by getting the copies of the docs repositories in synch, now fully “Hugo Modularized”. But it also comes with some very nice additions:
It is now possible to set the target format and the background fill color when processing images, e.g.:
{{ $image.Resize "600x jpg #b31280" }}
Another useful addon is the $pages.Next
and $pages.Prev
methods on the core page collections in Hugo. These works the same way as the built-in static variants one Page
, e.g. .Next
and .NextInSection
:
{{with .Site.RegularPages.Next . }}{{.RelPermalink}}{{end}}
The above is a functionally equivalent (but slightly slower) variant of:
{{with .Next }}{{.RelPermalink}}{{end}}
See Pages Methods for more information.
This release represents 45 contributions by 13 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, @BaibhaVatsa, and @XhmikosR 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 34 contributions by 20 contributors. A special thanks to @bep, @celtic-coder, @napcs, and @bmackinney for their work on the documentation site.
Hugo now has:
- 38843+ stars
- 441+ contributors
- 255+ themes
Notes
- Shortcode params can now be typed (supported types are
string
,bool
int
andfloat64
, see #6376. - Pages.Next/.Prev as described above has existed for a long time, but they have been undocumented. They have been reimplemented for this release and now works like their namesakes on
Page
. This may be considered a breaking change, but it should be a welcome one, as the old behaviour wasn’t very useful. See #4500
Enhancements
Templates
- Add optional “title” attribute to iframe in Vimeo shortcode 7b3edc29 @zbayoff
- Modify error messages of after, first, and last 65b7d422 @BaibhaVatsa #6415
- Last now accepts 0 as limit 0e75af74 @BaibhaVatsa #6419
- After now accepts 0 as index 096a4b67 @BaibhaVatsa #6388
- Make getJSON/getCVS accept non-string args 0d7b05be @bep #6382
- Add
rel="noopener"
for external links 34dc06b0 @XhmikosR - Remove unneeded space 2b1814ee @XhmikosR
- Remove eq argument limitation 5e660947 @vazrupe #6237
Output
- Add common video media types 689f647b @martignoni
- Simplify test output to simplify diffing 339ee371 @bep
- Use + to create the Type string 64ec8c89 @bep
- Support output image format in image operations e5856e61 @jansorg #6298
Other
- Replace /docs 39121de4 @bep
- Recover from file corruption 180195aa @bep #6401
- Allow to set background fill colour 4b286b9d @bep #6298
- Replace .RSSLink 46cafdba @bep #6037
- Use binary search in Pages.Prev/Next if possible 653e6856 @bep #4500
- Make Pages.Prev/Next work like the other Prev/Next methods f4f566ed @bep #4500
- Update feature_request.md 5f1aafaf @bep
- Update to Go 1.12.10 and 1.13.1 71b18a07 @bep #6406
- Add FileMeta.String f10db101 @bep
- Update minify to v2.5.2 b401858e @anthonyfok
- Add BaseFs to RenderingContext 020a6fbd @niklasfasching
- Update go-org b152216d @niklasfasching
- Upgrade to latest version of emoji dependency c466b88c @jamietanna #6391
- Upgrade to latest version of emoji dependency 170f18d9 @jamietanna
- Update Architectures 15a0364d @bep
- Add ability to invalidate Google Cloud CDN 674e81ae @gkelly
- Ensure same dirinfos sort order in TestImageOperationsGolden 298092d5 @anthonyfok
- Update bug_report.md 019ae384 @bep
- Support typed bool, int and float in shortcode params 329e88db @bep #6371
- Update Chroma e073f4ef @bep #6279
- Add issue templates and action 454a033d @bmackinney
- Add some more resource transform tests c262a95a @bep #6348
- Do not compile in Azure on Solaris c0d7188e @fazalmajid #6324
- Ignore “does not exist” errors in prune fcfa6f33 @bep #6326#5745
- Avoid writing the same processed image to /public twice 9442937d @bep #6307
- Update github.com/bep/gitmap 24ad4295 @bep #6313
Fixes
Core
Other
- Fix elements are doubling when append a not assignable type a9762b5c @vazrupe #6188
- Fix data race in global logger init bc70f2bf @bep #6409
- Fix image test error on s390x, ppc64* and arm64 39ed33fc @anthonyfok #6387
- Fix cache key transformed resources 6dec671f @bep #6348
- Fix cache keys for bundled resoures in transform.Unmarshal c0d75736 @bep #6327
- Fix concat with fingerprint regression 3be2c253 @bep #6309
Improve this page