v0.152.0

gohugoio/hugov0.152.0Oct 21, 2025by bep

AI Summary

A major release upgrading the YAML library to goccy/go-yaml, introducing YAML anchors/aliases, and tightening source validation for file mounts.

Key Highlights

  • Upgraded to github.com/goccy/go-yaml (modern library).
  • Support for YAML anchors and aliases.
  • Strictified source validation for file mounts.

Breaking Changes

  • Replaced gopkg.in/yaml with github.com/goccy/go-yaml.
  • YAML boolean parsing changed: yes/no/on/off are now strings, not booleans.

New Features

  • YAML anchors and aliases support.
  • Improved reserved key error messages for i18n.

Full Release Notes

The big new thing and the motivation behind this release is the upgrade to a more modern YAML library in @goccy 's  [github.com/goccy/go-yaml](https://github.com/goccy/go-yaml). It's been a surprisingly long and winding road to get here. **Note that this upgrade comes with some minor breaking changes, most notably that the old YAML 1.1 spec listed a set of strings that, when unquoted, were treated as boolean `true` or `false`.** So if you're using any of the values in the table below as booleans, you need to adjust your YAML, but I suspect that fixing this very surprising behavior will fix more issues than it introduces. A big new thing with this new YAML library is the support for [YAML anchors and aliases](https://www.linode.com/docs/guides/yaml-anchors-aliases-overrides-extensions/) which helps to reduce duplication in e.g. your configuration. There are some examples in Hugo's [release build configuration](https://github.com/gohugoio/hugo/blob/master/hugoreleaser.yaml) and in the [Hugo's CI release setup](https://github.com/gohugoio/hugo/blob/master/.circleci/config.yml).

Values|Old meaning|New meaning
:--|:--|:--
`yes`, `Yes`, `YES`, `y`, `Y`, `on`, `On`, `ON`|`true` (bool)|`yes`, `Yes`, `YES`, `y`, `Y`, `on`, `On`, `ON` (string)
`no`, `No`, `NO`, `n`, `N`, `off`, `Off`, `OFF`|`false` (bool)|`no`, `No`, `NO`, `n`, `N`, `off`, `Off`, `OFF` (string)


## Note

* Replace to gopkg.in/yaml with github.com/goccy/go-yaml (note) a3d954846 @bep #8822 #13043 #14053 

## Improvements

* config: Clone language map entries before modifying them a1307700d @bep #14072 
* Skip flaky test for now 9425b939c @bep #14072 
* Misc YAML adjustments bd50c9c7e @bep #14067 
* hugofs: Make sure that non-project module mounts are local paths a8e0ca925 @bep #14069 
* langs/i18n: Improve reserved key error message 559a029de @jmooring #14061 
* langs: Add test case using a "reserved" i18n code 5bad0d523 @bep #14061 

## Dependency Updates

* deps: Upgrade github.com/gohugoio/go-i18n/v2 184b10ed4 @bep 
* build(deps): bump github.com/tdewolff/minify/v2 from 2.24.3 to 2.24.4 9e344bbe4 @dependabot[bot] 

## Build Setup

* Merge branch 'release-0.151.2' d51adca26 @bep