Hugo 0.152.0 to 0.155.x breaking and notable changes
This post summarizes the breaking and notable changes in Hugo 0.152.0 to 0.155.1. It is a companion post to the Docsy 0.14.0 and 0.13.0 release and upgrade guides.
Breaking changes and deprecations
0.153.0
Release 0.153.0 (2025-12-19) introduces, among other things, a powerful new multidimensional content model (over languages, versions, and roles) through the new sites.matrix configuration option.
Breaking/notable changes related to multidimensional sites are summarized next.
Build order
- Description: Hugo now builds sites based on sorted dimensions (by
weight, then name) instead of starting with the default content language.
This also affects
.Site.Sitessort order. - Impact: May affect sites relying on specific build order.
- Example: the opentelemetry.io Docsy-based site was affected by this
change in build order. One of the fixes was to fetch the default site using
the
defaultselector rather than index 0 over.Site.Sites. For details, see open-telemetry/opentelemetry.io#8850.
- Description: Hugo now builds sites based on sorted dimensions (by
weight, then name) instead of starting with the default content language.
This also affects
langmount option deprecated- Description: The
langoption on mounts and segments is deprecated in favor ofsites.matrix. - Impact: Update configs to use new syntax.
- See migration details.
- Description: The
includeFiles/excludeFilesdeprecated- Description: File mount options deprecated in favor of
filesfilter with negation support. - Impact: Update mount configs.
- See migration details.
- Description: File mount options deprecated in favor of
Duplicate content path warnings removed
- Description: No longer logs warnings about potential duplicate content paths.
- Impact: Less noisy, but may hide issues.
Known issues with aliases
The following Hugo 0.153.x issues affected alias handling; they impacted at least one Docsy-based site (docsy.dev):
- Default language alias: Changes to default language alias behavior may cause refresh page issues. See gohugoio/hugo#14363 and gohugoio/hugo#14361.
- Page aliases: Page aliases may refer to the wrong language in some configurations. See Docsy #2433. Fixed in 0.154.0 and 0.155.0 (alias handling improvements).
0.152.0
Release 0.152.0 (2025-10-21) upgrades to a more modern YAML library, which introduces a breaking change to the way that YAML interprets certain tokens across configuration files and page front matter.
- Description: Values or keys like
yes,no,on,off, etc. are treated as strings rather than booleans. - Action required: Check your YAML files for these keys or values.
Notable changes
Notable changes that are non-breaking include:
- Support for version and dimension range queries in the sites matrix (e.g.,
>= v1.0.0) - Page aliases now work properly in multidimensional sites
- XMP and IPTC image metadata support added
- Support for version and dimension range queries in the sites matrix (e.g.,
- Partial decorators introduced (
innerkeyword) for powerful template composition - New
Page.OutputFormats.Canonicalmethod (0.154.4) - New
reflect.*functions, such asreflect.IsPage - Critical fixes for alias handling and site redirects in multidimensional/multihost setups
- Partial decorators introduced (
- WebP encoding/decoding now uses
libwebpvia WASM. The extended edition is no longer required for WebP. - Animated WebP support, including conversion to/from animated GIFs
GoogleAnalytics.RespectDoNotTrackdefault changed totrue- macOS distributions are solely as signed and notarized
.pkginstallers,.tar.gzis no longer supported. See the notes below.
- WebP encoding/decoding now uses
hugo-extended NPM package- You can still extract Hugo executables from macOS installer
.pkgfiles; see hugo-extended#183 for thepkgutilcommand. - The hugo-extended NPM package briefly required
sudoin versions 0.153.0–0.153.3.
Migrating to Hugo 0.155.x
This section describes how to migrate to the latest patch release of Hugo 0.155.
1. YAML yes/no etc. are strings
Search for these unquoted key or value tokens:
yes,Yes,YES,y,Y,on,On,ON: change totrueno,No,NO,n,N,off,Off,OFF: change tofalse
For example:
# OLD (now broken in 0.152.0+)
enabled: yes
disabled: no
# NEW (correct)
enabled: true
disabled: false
Also, for Docsy projects that have custom page Feedback configuration: search for quoted keys (or values) containing the previously listed tokens, and in most cases, you can now drop the quotes. For example:
# OLD
params:
ui:
feedback:
enable: true
"yes": Glad to hear it! ...
'no': Sorry to hear that. ...
# NEW
params:
ui:
feedback:
enable: true
yes: Glad to hear it! ...
no: Sorry to hear that. ...
2. Use sites.matrix instead of lang in mounts
If using lang on mounts, migrate to sites.matrix to avoid deprecation
warnings:
# OLD (deprecated)
- source: content/fr
target: content
lang: fr
# NEW
- source: content/fr
target: content
sites:
matrix:
languages: ['fr']
For example, see open-telemetry/opentelemetry.io#9070.
3. Replace includeFiles/excludeFiles with files
Migrate includeFiles/excludeFiles to files to avoid deprecation warnings:
# OLD (deprecated)
- source: content
target: content
excludeFiles: ['draft/*']
# NEW
- source: content
target: content
files: ['! draft/*']
The file exclusion syntax has a leading ! followed by a space. Without
the space, the glob pattern is treated as a literal path and so will fail to
exclude the desired files. For a discussion on the topic, see Why does glob
negation require a space after?
For example, see open-telemetry/opentelemetry.io#9070.
Recommended minimum Hugo version
For projects using the new sites matrix features who also want the latest fixes and updated support for aliases in the context of multidimensional sites, we recommend using Hugo 0.155.0 or later:
module:
hugoVersion:
min: 0.155.0