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
fallbackfor 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
stringfor string input, which avoids HTML escaping in plain text output formats. --printPathWarningsnow detects aliases that overwrite pages.
Notes
- hugo.IsExtended is deprecated and now always returns
true. - The
renderHooks.{image,link}.useEmbeddedvalueautois now an alias forfallback, which is the new default for all projects. If you relied on the embedded hooks being disabled, setuseEmbedded = "never". - Special purpose templates (sitemap, sitemap index and
robots.txt) must now be selected by output format; e.g. a user-providedall.txtno longer rendersrobots.txt. - Pages with the same language weight are now sorted by
Langas 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 de5b848 @bep #15674
- helpers: Fix FormatByteCount for values below 1 GB 7c74c4a @lingyicute
- Fix --printPathWarnings to detect aliases overwriting pages 0c3e709 @bep #15645
- tpl/tplimpl: Store suffix-only templates once per media type 4918c1c @bep #15590
- hugolib: Fix role resource leak when the role is set in the filename 84013f6 @bep #15627
- tpl/tplimpl: Fix inconsistent goat rendering in non-HTML output formats f081c01 @bep #15614
- resources: Fix useResourceCacheWhen fallback when PostCSS is not found c595ea3 @jmooring #15609
- common/paths: Strip hash sign (#) from sanitized paths b72586b @bep #15663 #12343
- resources/images: Add images.Meta filter 37e1b77 @bep #15632
- tpl/strings: Make truncate return string for string input c14d0f6 @bep #15668
- cache/dynacache: Rework partition sizing and memory-constrained eviction 87bdb6b @bep #15616
- markup/highlight: Cache highlighted code across sites 5ef3b2a @svrnm #15616
- Use Lang as the tiebreaker for sorting pages with the same language weight b3d0a6d @bep #15644
- resources/page: Deprecate hugo.IsExtended and make it return true 6a4c7d5 @jmooring #15508
- markup/goldmark: Adjust the ToC writer setup 5fa3adb @bep
- markup/goldmark: Reuse one buffered writer when building the TOC ae40532 @g4lb
- hugolib: Reuse content for pages with tables across output formats d3d8d0f @bep #13351 #15639
- resources/page: Guard reversed bounds in permalink slices 89d2921 @1solomonwakhungu
- markup/goldmark: Make renderHooks.{image,link}.useEmbedded always default to fallback c9ac14c @bep #15623 #15620
- common/urls: Format IPv6 hosts in BaseURL.WithPort 61e3122 @1solomonwakhungu
- tpl/collections: Compare time.Time values by instant in intersect b44b698 @waw666waw666 #15577 #15577
- Make shared resource picking stable between builds ce85fe2 @bep #15624
- all: Rename ErrFeatureNotAvailable to ErrExecNotFound 68434dd @jmooring #15611
- resources/images: Validate images.Opacity argument e71d1ab @jmooring #15612
- Improve error messages for missing executables and hugo deploy 3599758 @jmooring #13003
Dependency Updates
- build(deps): bump golang.org/x/tools from 0.52.0 to 0.53.0 47f831e @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.24.25 to 2.25.0 871a970 @dependabot[bot]
- build(deps): bump github.com/bits-and-blooms/bitset 69bdd26 @dependabot[bot]
- build(deps): bump go.opentelemetry.io/otel/sdk from 1.45.0 to 1.47.0 7f0b441 @dependabot[bot]
- deps: Update github.com/bep/golocales v0.2.0 => v0.4.0 20b8963 @jmooring #15630