Skip to content

Releases: gohugoio/hugo

v0.159.0

23 Mar 18:36
@bep bep

Choose a tag to compare

This release greatly improves and simplifies management of Node.js/npm dependencies in a multi-module setup. See this page for more information.

Note

  • Replace deprecated site.Data with hugo.Data in tests a8fca59 @bep
  • Replace deprecated excludeFiles and includeFiles with files in tests 182b104 @bep
  • Replace deprecated :filename with :contentbasename in the permalinks test eb11c3d @bep

Bug fixes

Improvements

Dependency Updates

Documentation

v0.158.0

16 Mar 18:07
@bep bep

Choose a tag to compare

This release adds css.Build, native and very fast bundling/transformation/minifying of CSS resources. Also see the new strings.ReplacePairs, a very fast option if you need to do many string replacements.

Notes

Deprecations

The methods and config options are deprecated and will be removed in a future Hugo release.

Also see this article

Language configuration

  • languageCode → Use locale instead.
  • languages.<lang>.languageCode → Use languages.<lang>.locale instead.
  • languages.<lang>.languageName → Use languages.<lang>.label instead.
  • languages.<lang>.languageDirection → Use languages.<lang>.direction instead.

Language methods

  • .Site.LanguageCode → Use .Site.Language.Locale instead.
  • .Language.LanguageCode → Use .Language.Locale instead.
  • .Language.LanguageName → Use .Language.Label instead.
  • .Language.LanguageDirection → Use .Language.Direction instead.

Bug fixes

Improvements

Dependency Updates

v0.157.0

25 Feb 17:00
@bep bep

Choose a tag to compare

The notable new feature is GitInfo support for Hugo Modules. See this repo for a runnable demo where multiple versions of the same content is mounted into different versions.

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump github.com/tdewolff/minify/v2 from 2.24.8 to 2.24.9 9869e71 @dependabot[bot]
  • build(deps): bump github.com/bep/imagemeta from 0.14.0 to 0.15.0 8f47fe8 @dependabot[bot]

v0.156.0

18 Feb 17:21
@bep bep

Choose a tag to compare

This release brings significant speedups of collections.Where and collections.Sort – but this is mostly a "spring cleaning" release, to make the API cleaner and simpler to understand/document.

Deprecated

  • Site.AllPages is Deprecated
  • Site.BuildDrafts is Deprecated
  • Site.Languages is Deprecated
  • Site.Data is deprecated, use hugo.Data
  • Page.Sites and Site.Sites is Deprecated, use hugo.Sites

See this topic for more info.

Removed

These have all been deprecated at least since v0.136.0 and any usage have been logged as an error for a long time:

Template functions

  • data.GetCSV / getCSV (use resources.GetRemote)
  • data.GetJSON / getJSON (use resources.GetRemote)
  • crypto.FNV32a (use hash.FNV32a)
  • resources.Babel (use js.Babel)
  • resources.PostCSS (use css.PostCSS)
  • resources.ToCSS (use css.Sass)

Page methods:

  • .Page.NextPage (use .Page.Next)
  • .Page.PrevPage (use .Page.Prev)

Paginator:

  • .Paginator.PageSize (use .Paginator.PagerSize)

Site methods:

  • .Site.LastChange (use .Site.Lastmod)
  • .Site.Author (use .Site.Params.Author)
  • .Site.Authors (use .Site.Params.Authors)
  • .Site.Social (use .Site.Params.Social)
  • .Site.IsMultiLingual (use hugo.IsMultilingual)
  • .Sites.First (use .Sites.Default)

Site config:

  • paginate (use pagination.pagerSize)
  • paginatePath (use pagination.path)

File caches:

  • getjson cache
  • getcsv cache

Notes

Bug fixes

Improvements

Dependency Updates

Build Setup

Documentation

v0.155.3

08 Feb 17:06
@bep bep

Choose a tag to compare

What's Changed

  • hugolib: Don't render default site redirect for non-primary isHTML output formats 6ac7d08 @bep #14482
  • server: Fix stuck server global error logging 24eb84f @bep #14469
  • build(deps): bump github.com/evanw/esbuild from 0.27.2 to 0.27.3 95a3678 @dependabot[bot]
  • server: Fix panic when the server browser error handler tried to use a config in a state of flux 9045797 @bep #14470

v0.155.2

02 Feb 10:41
@bep bep

Choose a tag to compare

Note that the bug fix below is for the two new dimensions introduced in v0.153.0 (version and role), multiple languages worked fine. Also, changes to the first version and role also worked, which had me head-scratching for a while. Oh, well, enjoy.

v0.155.1

30 Jan 10:36
@bep bep

Choose a tag to compare

What's Changed

v0.155.0

28 Jan 17:29
@bep bep

Choose a tag to compare

Some notable new things in this release are:

  • Improvements to how versions are handled: We now support version (and also for the other dimension) range queries (e.g. >= v1.0.0), and we now cache Go module version queries, which makes mounting multiple versions of the same GitHub repo with different version much more practical and enjoyable, se this site and config for an annotated example.
  • We finally have XMP and IPTC image metadata support, in addition to EXIF, see #13146
  • Page aliases now works in multidimensional sites (e.g. multiple languages), and it is now much easier to create e.g. Netlify _redirects files that works in such setups.
  • There are several performance related WebP improvements in this release.
  • Also, image processing in general (e.g. resize operations) should be considerably more effective.

Breaking change

Prior to v0.155.0, alias paths beginning with a slash (/) were treated as server-relative. In v0.155.0 and later, they are now site-relative. This change only affects multilingual single-host projects that used alias paths beginning with a slash (/) to cross language boundaries. See details.

Note

  • Make Page.Aliases more useful in multidimensional setups (note) ee91c70 @bep #14402

Bug fixes

Improvements

Dependency Updates

Build Setup

Documentation

v0.154.5

11 Jan 21:18
@bep bep

Choose a tag to compare

What's Changed

v0.154.4

10 Jan 16:30
@bep bep

Choose a tag to compare

What's Changed

Also see the new Page.OutputFormats.Canonical method.