Skip to content

Releases: gohugoio/hugo

v0.123.0

19 Feb 17:46
@bep bep
Compare
Choose a tag to compare

The work title for the v0.123.0 release has been "the million pages release", introducing a new memory limit that allows for a streaming build, shifting large objects out of memory when not in use. This release is also a rewrite of the Hugo core, fixing lots of long-lived bugs and adding some other exciting improvements (see below). There are some breaking changes that have been announced for a long time. Most sites will not be affected by this, but we recommend that you test your site with the new Hugo version before you set it up to build to production. Many people have contributed to this release, but a special shoutout goes to @bep and @jmooring, but also to @TiGR and @McShelby for their help testing and reporting bugs.

A list of notable new features:

  • You can now set a upper memory limit (default 25% of system memory) via the OS environment variable HUGO_MEMORYLIMIT (in gigabytes) allowing for much larger data/page sets and/or running on lower specced PCs. This is backed by a partitioned LRU cache used throughout Hugo. A cache that gets dynamically resized in low memory situations, allowing Go's Garbage Collector to free the memory. Note that for regular sized Hugo sites, the performance should be about the same as before.
  • New dependency tracker for partial server rebuilds. This quickly calculates the delta given a changed resource (e.g. a content file, template, JS file etc.) and supports transitive relations.
  • A new document store. Previously, a little simplified, we split the document store (where we store pages and resources) in a tree per language. This worked pretty well, but the structure made some operations harder than they needed to be. We have now restructured it into one Radix tree for all languages. Internally the language is considered to be a dimension of that tree, and the tree can be viewed in all dimensions concurrently. This makes some operations re. language simpler (e.g. finding translations is just a slice range), but the idea is that it should also be relatively inexpensive to add more dimensions if needed (e.g. role). With this we also introduce a new logical page Path which we will used going forward to support other content data sources.
  • Add warnidf template function, see docs
  • Add the [params] concept to front matter, see docs
  • Add images.Dither filter, see docs

Bug fixes

Improvements

Dependency Updates

Documentation

Build Setup

v0.122.0

26 Jan 16:07
@bep bep
Compare
Choose a tag to compare

The big new thing in Hugo 0.122.0 is LaTeX or TeX typsetting directly from Markdown using standard syntax. Thanks to @j2kun and @jmooring for making this happen.

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump golang.org/x/tools from 0.16.0 to 0.17.0 e0021f4 @dependabot[bot]
  • build(deps): bump github.com/rogpeppe/go-internal from 1.11.0 to 1.12.0 d25902c @dependabot[bot]
  • build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.0 to 2.1.1 2dd6083 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.19.8 to 0.19.12 45f52be @dependabot[bot]
  • deps: Update github.com/tdewolff/minify/v2 v2.20.9 => v2.20.13 8915343 @jtatum

Documentation

v0.121.2

05 Jan 12:36
@bep bep
Compare
Choose a tag to compare

The main motivation behind this release is a security fix in the upstream golang.org/x/crypto library. We don't see how that CVE could be exploited via Hugo, but we do appreciate that many want to have a clean security report.

There's also some new features in this release:

What's Changed

v0.121.1

08 Dec 09:13
@bep bep
Compare
Choose a tag to compare

The only change in this release is that the release binaries are compiled with Go 1.21.5 which contains some security fixes that are relevant for Hugo.

v0.121.0

05 Dec 15:44
@bep bep
Compare
Choose a tag to compare

There are some minor new features in this release, but it's mostly a release with bug fixes and dependency updates. One notable dependency update is libweb v1.3.2 which comes with a security fix for the Webp decoder (chromium: #1479274, CVE-2023-4863). Hugo only uses the encoder (we use Go's native Webp decoder) so we're not affected by this, but we have been contacted by some corporate Hugo users who's eager to have a clean security report.

Notes

  • kin-openapi v0.122.0 has some minor breaking API changes which, from Hugo's side of it, can be adapted by using the new .Map accessors if you get an error.

Bug fixes and enhancements

Dependency Updates

Documentation

v0.120.4

08 Nov 13:07
@bep bep
Compare
Choose a tag to compare

The only change in this release is that the release binaries are compiled with Go 1.21.4 which comes with a security fix for Windows that may be relevant for Hugo. See:

What's Changed

v0.120.3

01 Nov 18:12
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.120.2

31 Oct 16:45
@bep bep
Compare
Choose a tag to compare

What's Changed

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