github gohugoio/hugo v0.119.0

latest releases: v0.134.3, v0.134.2, v0.134.1...
12 months ago

This version is built with Go 1.21.1 which contains some relevant security fixes for the html/template package, see Issue 62196 and Issue 62197. This is the main reason Hugo 0.119.0 is released sooner rather than later. But this release also comes with a dependency refresh and some useful image processing improvements:

  • A new general-purpose Process method and filter.
  • A new Opacity filter.

Process support all of the existing scaling operations, but it can also be used do simple format conversions (e.g. from JPG to PNG). A before/after example:

{{ $watermark := resources.Get "logo.jpg" | images.Filter  
       (images.GaussianBlur 6) 
       (images.Opacity 0.5) 
}}
{{ $watermark = $watermark.Resize (printf "%dx%d png" $watermark.Width $watermark.Height )

There are some issues with the above:

  1. The source image does not support transparency, so the transparency pixels will be filled with the configured background colour.
  2. The image will be decoded and encoded twice with a potential loss in quality.
  3. It's clumsy.

With Hugo 0.119.0 the above can be written as:

{{ $watermark := resources.Get "logo.jpg" | images.Filter  
       (images.GaussianBlur 6) 
       (images.Opacity 0.5) 
       (images.Process "png") 
}}

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump golang.org/x/tools from 0.12.0 to 0.13.0 a262fd4 @dependabot[bot]
  • build(deps): bump github.com/alecthomas/chroma/v2 from 2.8.0 to 2.9.1 f0d3245 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.19.2 to 0.19.3 e8bc8e6 @dependabot[bot]
  • build(deps): bump github.com/aws/aws-sdk-go from 1.44.314 to 1.45.14 11fcda9 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.118.0 to 0.120.0 f31375d @dependabot[bot]
  • build(deps): bump golang.org/x/image from 0.11.0 to 0.12.0 6415b59 @dependabot[bot]

Documentation

Don't miss a new hugo release

NewReleases is sending notifications on new releases.