The notable new feature in this release is the images.Meta filter, which writes copyright, creator, title, description, date and GPS position as EXIF and XMP metadata to processed JPEG, PNG, WebP, TIFF and AVIF images. Other notable changes:
- Better performance and memory usage in some setups: highlighted code is now cached across sites, pages with tables no longer get their content rendered again for every output format (e.g. RSS), and the dynamic cache has a new partition sizing and eviction strategy for memory-constrained builds.
- Templates without an output format in the file name (e.g. list.xml) are now used for all output formats sharing that suffix (e.g. RSS and a custom Atom format), not just the first one.
- The embedded link and image render hooks now default to fallback for all projects. Before, this depended on the language setup in a way that was hard to reason about.
- The hash sign (#) is now stripped from published file names, as some hosts (e.g. Netlify) reject them.
- strings.Truncate now returns a string for string input, which avoids HTML escaping in plain text output formats.
- --printPathWarnings now detects aliases that overwrite pages.
Notes
- hugo.IsExtended is deprecated and now always returns true.
- The renderHooks.{image,link}.useEmbedded value auto is now an alias for fallback, which is the new default for all projects. If you relied on the embedded hooks being disabled, set useEmbedded = "never".
- Special purpose templates (sitemap, sitemap index and robots.txt) must now be selected by output format; e.g. a user-provided all.txt no longer renders robots.txt.
- Pages with the same language weight are now sorted by Lang as a tiebreaker.
Security
- If you use roles to separate content (e.g. guests vs. members), resources with the role set in the file name (e.g. foo.role_member.txt) in a page bundle spanning multiple roles were published for all roles. This is fixed in this release; the role set in the file name now wins over the mount (#15627).
Changes
- hugolib: Fix nil pointer in page Key with debug logging on rebuild de5b8480 @bep #15674
- helpers: Fix FormatByteCount for values below 1 GB 7c74c4a5 @lingyicute
- Fix --printPathWarnings to detect aliases overwriting pages 0c3e7098 @bep #15645
- tpl/tplimpl: Store suffix-only templates once per media type 4918c1cf @bep #15590
- hugolib: Fix role resource leak when the role is set in the filename 84013f66 @bep #15627
- tpl/tplimpl: Fix inconsistent goat rendering in non-HTML output formats f081c01f @bep #15614
- resources: Fix useResourceCacheWhen fallback when PostCSS is not found c595ea3e @jmooring #15609
- common/paths: Strip hash sign (#) from sanitized paths b72586ba @bep #15663 #12343
- resources/images: Add images.Meta filter 37e1b771 @bep #15632
- tpl/strings: Make truncate return string for string input c14d0f61 @bep #15668
- cache/dynacache: Rework partition sizing and memory-constrained eviction 87bdb6ba @bep #15616
- markup/highlight: Cache highlighted code across sites 5ef3b2a3 @svrnm #15616
- Use Lang as the tiebreaker for sorting pages with the same language weight b3d0a6df @bep #15644
- resources/page: Deprecate hugo.IsExtended and make it return true 6a4c7d54 @jmooring #15508
- markup/goldmark: Adjust the ToC writer setup 5fa3adb4 @bep
- markup/goldmark: Reuse one buffered writer when building the TOC ae405321 @g4lb
- hugolib: Reuse content for pages with tables across output formats d3d8d0f2 @bep #13351 #15639
- resources/page: Guard reversed bounds in permalink slices 89d29219 @1solomonwakhungu
- markup/goldmark: Make renderHooks.{image,link}.useEmbedded always default to fallback c9ac14cd @bep #15623 #15620
- common/urls: Format IPv6 hosts in BaseURL.WithPort 61e3122e @1solomonwakhungu
- tpl/collections: Compare time.Time values by instant in intersect b44b698e @waw666waw666 #15577 #15577
- Make shared resource picking stable between builds ce85fe2b @bep #15624
- all: Rename ErrFeatureNotAvailable to ErrExecNotFound 68434dda @jmooring #15611
- resources/images: Validate images.Opacity argument e71d1abf @jmooring #15612
- Improve error messages for missing executables and hugo deploy 35997588 @jmooring #13003
Dependency Updates
- build(deps): bump golang.org/x/tools from 0.52.0 to 0.53.0 47f831ef @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.24.25 to 2.25.0 871a970b @dependabot[bot]
- build(deps): bump github.com/bits-and-blooms/bitset 69bdd266 @dependabot[bot]
- build(deps): bump go.opentelemetry.io/otel/sdk from 1.45.0 to 1.47.0 7f0b4416 @dependabot[bot]
- deps: Update github.com/bep/golocales v0.2.0 ⇒ v0.4.0 20b89633 @jmooring #15630