Skip to content

Releases: gohugoio/hugo

v0.120.1

30 Oct 16:59
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.120.0

30 Oct 14:28
@bep bep
Compare
Choose a tag to compare

This is a full dependency refresh and a couple of new cool features:

A new Padding image filter, and a new debug.Timer template func. The new debug.Timer is useful for finding performance bottle necks in templates:

{{ $timer := debug.Timer "slowTemplate" }}
// ...
{{ $timer.Stop }}

If you then run hugo --logLevel info you should see timer info logged at the end of the build. You can have as many timers as you want and if you don't stop them, they will be stopped at the end of build.

Hugo now also builds release binaries for Solaris now that a long-living issue in the upstream ƒsnotify library has been fixed, thanks to @nshalman.

Notes

  • The enableEmoji flag now only works for Markdown content. This is unfortunate, but the old solution has some known issues and it was too hard to make it work properly as a general thing across all formats. See #11598
  • site.DisqusShortname is deprecated 2eca1b3
  • site.GoogleAnalytics is deprecated a692278
  • site.Author is deprecated d4016dd
  • site.Social is deprecated 4910312

Also, we have changed the string type for some of the fields and methods:

  • .Fragments.ToHTML now returns template.HTML
  • $resource.Data.Integrity now returns a string and not a template.HTMLAttr
  • delimit now returns a string and not a template.HTML See #10876 #11502.
  • the URL functions now returns a string, see #11536
  • The paginator Pager now returns a string.
  • site.BaseURL now returns a string.

The above should both solve some issues and make the above types more useful and easer to reason about. But if you use the delimit function to process HTML and see some unexpected escaping after this release, e.g.:

{{ $s := slice "<i>foo</i>" }}
{{ delimit $s "," }}

Then you need to mark the type with safeHTML:

{{ $s := slice "<i>foo</i>" }}
{{ delimit $s "," | safeHTML }}

Bug fixes

Improvements

Dependency Updates

Documentation

v0.119.0

24 Sep 15:36
@bep bep
Compare
Choose a tag to compare

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

v0.118.2

31 Aug 11:36
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.118.1

31 Aug 09:56
@bep bep
Compare
Choose a tag to compare

Note: There still seem to be an issue on Vercel.


This release only fixes a GLIBC_xxx not found issue with the Linux AMD64 binary when running on older Linux versions, which is the situation when building on Netlify/Vercel etc. 7e9092e @bep #11414

There's no functional changes in this release. See v0.118.0.

v0.118.0

31 Aug 08:02
@bep bep
Compare
Choose a tag to compare

Note: Hugo 0.118.2 fixes an issue with the Linux binaries when building on Netlify/Vercel/etc.


Hugo 0.118.0 now builds with Go 1.21. This version also comes with:

  • Proper CJK support in Markdown:
  [markup.goldmark]
    [markup.goldmark.extensions]
      [markup.goldmark.extensions.cjk]
        # Whether to enable CJK support.
        enable = false
        # Whether softline breaks between east asian wide characters should be ignored.
        eastAsianLineBreaks = false    
        #  Whether a '\' escaped half-space(0x20) should not be rendered.
        escapedSpace = false
  • A revamped implementation of hugo new site and hugo new theme. See details.

Bug fixes

Improvements

Dependency Updates

Documentation

Build Setup

v0.117.0

07 Aug 13:04
@bep bep
Compare
Choose a tag to compare

This is a release on the small side, but. especially the new Page.RenderShortcodes method is so useful, especially for bigger sites, that we decided to get it out sooner rather than later. This method renders all the shortcodes in the content, preserving the surrounding markup (e.g. Markdown) as is. See the Hugo Documentation for more information.

Improvements

Dependency Updates

Documentation

v0.116.1

01 Aug 07:39
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.116.0

31 Jul 10:50
@bep bep
Compare
Choose a tag to compare

There are two notable changes in this release. For one, we have changed the default location of the cacheDir (where Hugo stores all its file caches). Having the cache stored in a /tmp folder has had its issues, especially for the module cache and especially on MacOS. The current new default should be better and more stable. See See Configure CacheDir for more info.

Also in this release: The where template func finally supports regular expressions with the new like operator.

Note

Bug fixes

Improvements

Dependency Updates

Documentation

Build Setup

v0.115.4

20 Jul 07:19
@bep bep
Compare
Choose a tag to compare

Bug fixes

Improvements