Releases: gohugoio/hugo
v0.154.1
v0.154.0
Hugo v0.154.0 is the 14th release this year (not counting patch releases) and introduces partial decorators, or “partials with a twist.” This is a very powerful construct that I, @bep, have always wanted to have in Hugo, but I could never wrap my head around an implementation. Until now.
A small and not very useful example:
The above renders to:
- The new
innerkeyword can be used zero or more times in a partial template, typically with different data (e.g. pages in a range), and its presence signals a reversal of the execution -- the callee becomes the caller. - Decorators can be deeply nested, see this PR for an example.
This release also brings some new utility funcs in the reflect package to identify the core types in Hugo. For example, to identify an processable image hasn't been trivial, now it is:
Bug fixes
- tpl/collections: Fix apply to work with built-in funcs like len 5c7fad2 @bep #13418
- Revert "resources/page: Fix slugorcontentbasename for section pages" bf1d20d @bep #14104 #14325
Improvements
- helpers: Limit verbose watch output for better readability d3b5d47 @majiayu000 #14277
- tpl/reflect: Make the IsImageResource implementation less technical 86cd183 @bep
- internal/warpc: Increase WebP memory limit to 384 MiB 871da33 @jmooring #14309
- Update tpl/reflect/reflect.go 1deec99 @bep
- Add reflect.Is{Page,Site,Resource,ImageResource} b7bb557 @bep #14307
- Allow partials to work as decorators 7c19c19 @bep #13193
Dependency Updates
- build(deps): bump github.com/tetratelabs/wazero from 1.10.1 to 1.11.0 2637aa1 @dependabot[bot]
v0.153.5
v0.153.4
v0.153.3
v0.153.2
v0.153.1
Note
This is a bug fix release. See the main release for a list of new features.
v0.153.0
Note
There is a newer bug fix release available here.
This is a good one! Hugo v0.153.0 comes with a powerful new multidimensional content model (languages, versions and roles) and completely overhauls WebP image support, and much more:
- For the new multidimensional content model, start reading sites matrix and sites complements. The matrix is what gets written to disk,
complementsallows e.g. a site in Swedish to fill in missing gaps in the site in Norwegian's page and resource collections. Also see the new Rotate method, that allows you to rotate the content tree in a given dimension. - For WebP we now build a WASM version of libwebp (
v1.6.0) and run it in the Wazero runtime. We use this for both encoding and decoding. This solves an old and annoying issue with Go's stdlib's decoder, with loss of contrast and muted colors in some photos, but it also means that you don't need the extended version of Hugo to handle WebP images. And, drum roll, we now also support animated WebP, including converting to and from animated GIFs. - For MacOS, we now build signed and notarised
pkginstallers.
Also:
- The Asciidoctor integration is greatly improved.
- New template funcs urls.PathUnescape and urls.PathEscape.
- openapi3.Unmarshal now support external refs (including remote refs).
Notes
- tpl/css: Deprecate libsass in favor of dartsass (note) 9937a5d @bep #14261
- Build Order: Hugo builds sites based on the sorted dimensions (see below). In earlier versions, we built the sites starting with the default content language. This change is also reflected in the sort order of
.Site.Sitesto make it consistent with.Site.Languages. - Sort Order: The dimensions are sorted as follows, which affects build order and complement selection:
- languages: By weight, then by name.
- versions: By weight, then by semantic versioning (descending).
- roles: By weight, then by name.
- Deprecations:
- The lang option on mounts (https://gohugo.io/configuration/module/#mounts) and segments
(https://gohugo.io/configuration/segments/#segment-definition) is deprecated in favor of the more powerfulsites.matrix
option. - File mount
includeFilesandexcludeFilesare deprecated in favour of the new files filter, which supports negation.
- The lang option on mounts (https://gohugo.io/configuration/module/#mounts) and segments
- Logging: We no longer log warnings about potential duplicate content paths, as this becomes impractical to reason about with a
complex sites matrix.
Bug fixes
- Fix some outdated front matter b82e496 @bep #14271
- Fix server rebuilds on editing content with Chinese terms e2e64ae @bep #14240
- Fix slow server startup of very big content trees 7a43b92 @bep #14211
- github: Fix "no space left on device" issue in CI b037b93 @bep
- docs: Fix link to CGO wiki page 5af3112 @jordelver
- Fix grammatical error in styleguide.md 62c4740 @bep
- hugolib: Fix recently introduced data race 94a6233 @bep #14140
- docshelper: Fix some YAML serialization issues with sites matrix configuration 22d0c17 @bep #14132
- resources/page: Fix slugorcontentbasename for section pages 25c7c18 @dvdksn #14104
- all: Fix some benchmarks broken by modernize 91eac9e @bep #14107
- all: Run modernize -fix ./... 04650ce @bep #14107
Improvements
- resources/images: Don't trust the file extension when decoding JPEG and PNG images 65d43e1 @bep
- Add full filename to image processing error messages if possible 65a7666 @bep #14278
- tailwindcss: Add referece to skipInlineImportsNotFound when import not found in assets da5b1fc @bep #14273
- Improve error messages for template failures 0637adb @bep
- Improve error handling/messages in Hugo Pipes 0bf6135 @bep #14257 #14270
- images: Add a webp test with bg color 573ecb5 @bep
- Encode and Decode using the libwebp library via WASM with animation support 1b4514e @bep #10030 #8500 #12843 #8879 #12842
- config/allconfig: Correct error message 429e572 @jmooring #14259
- tpl: Add missing functions to init files fa7d37f @jmooring #14249
- github: Add some known humans to the AI whitelist fae49a2 @bep
- langs/i18n: Prefer languageCode when picking translation file 6be463b @bep #14204 #14217
- Add entitlements for WebAssembly for macOS Tahoe 9e24b56 @bep #14220
- testscripts: Move layouts file to new structure 45b67f6 @bep
- resources: Skip integration test if Dart Sass is not installed 5e649eb @jmooring
- testing: Replace legacy config.toml with hugo.toml in most tests 3073fd5 @bep
- testing: Port integration tests to new templates structure b9b304a @bep
- github: Correct dependabot => dependabot[bot] 8be30ef @bep
- config/privacy: Change GoogleAnalytics.RespectDoNotTrack default to true 565a10c @jmooring #13307
- Add signed and notarized MacOS pkg builds 438f113 @bep #14135
- Upgrade to Go 1.25.4 dab5405 @bep
- tpl/urls: Add PathEscape and PathUnescape functions 1a1b062 @jmooring #14209
- Speedup and simplify page assembly for deeper content trees 555dfa2 @bep
- gemini: Remove styleguide.md (for now) 34b0c15 @bep
- github: Reenable Gemini, but no auto code review 9dc38e9 @bep
- github: Partition tests by their root b592d34 @bep
- github: Make the clean commands work 18a2afa @bep
- github: Also test the root package (left out in previous commit) 0b0c827 @bep
- github: More disk space saving optimizations 30dc75e @bep
- github: Add PR Template 6bc8e6f @jmooring
- Adjust benchmark cda4d75 @bep
- tpl/openapi: Add support for OpenAPI external file references 84950ed @bep #8067
- github: Skip dependabot for AI Watchdog workflow a8ed613 @bep
- github: Remove the 386 test step in GitHub test workflow b971b7f @bep #14201
- github: Remove test binaries after CI test runs 24210dc @bep
- github: Adjust watchdog run logic (now with correct spelling) 0f94274 @bep
- github: Adjust watchdog run logic (again) 5f9c3a3 @bep
- github: Adjust watchdog run logic 51d77a6 @bep
- github: Only run AI Watchdog when the PR is ready for review d25b619 @bep
- Update aiwatchdog.yml 4a76d8c @bep
- Update aiwatchdog.yml d837eff @bep
- Update aiwatchdog.yml 323e306 @bep
- github: Add label to AI suspects and do not fail when confident 2047638 @bep
- github: Adjust AI Watchdog workflow to make it run PRs from forks 38efb70 @bep
- github: Adjust workflow permissions bdf8b1a @bep
- performance: Misc allocation improvements f33c1a3 @bep
- github: Add ai-watchdog workflow and update other workflows' versions 56d7925 @bep #14147
- tpl/collections: Improve collections.D c6b6910 @jmooring #14143
- Optimize memory allocations for sites matrix vector stores ca40254 @bep
- gemini: Disable auto PR codereviews for now 44b5f13 @bep
- Update styleguide.md 2c6574e @bep
- Add gemini setup files 60c4245 @bep
- static: Preserve .gitignore and .gitattributes in --cleanDestinationDir 5e6b269 @Ahamed1846 #14097
- hugolib: Improve performance of content trees with many sections 26f31ff @bep
- Add a site assembly benchmark test for a deeper site structure with more sections and pages 606415e @bep
- sitesmatrix: Clary default dimension values dc2f6ae @bep
- Run go mod tidy to clean up go.mod and go.sum a0944ac @bep
- testing: Rewrite all the old style integration tests to txtar style tests a2469d5 @bep
- hugolib: Delete some old integration tests e24b604 @bep
- testing: Revise usage of b.N and b.Loop() in benchmarks 4c7a78f @bep
- Add roles and versions as new dimensions (in addition to language) 264022a @bep #519 #13680 #13663 #13776 #13855 #13648 #13996 #14001 #14031 #13818 #13196
- Update CONTRIBUTING.md ff0f67e @bep
- hreflect: Cache reflect method lookups used in collections.Where and others e9bda21 @bep
- all: Simplify the reflect usage 3893e70 @bep
Dependency Updates
- build(deps): bump github.com/goccy/go-yaml from 1.19.0 to 1.19.1 39649dc @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.21.0 to 2.21.1 614fb16 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront 33542d3 @dependabot[bot]
- deps: Upgrade github.com/alecthomas/chroma/v2 v2.20.0 => v2.21.0 588d20b @bep #14266
- build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.40.1 to 1.41.0 b337302 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.27.1 to 0.27.2 e6a3f1d @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.33.0 to 0.34.0 364d237 @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.39.0 to 0.40.0 079f3eb @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.24.7 to 2.24.8 4e6f2b6 @dependabot[bot]
- build(deps): bump gocloud.dev from 0.43.0 to 0.44.0 dff5e16 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront c82a035 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.27.0 to 0.27.1 86b01ed @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.40.0 to 1.40.1 9e7182e @dependabot[bot]
- build(deps): bump github.com/spf13/cobra from 1.9.1 to 1.10.2 cf3ad62 @dependabot[bot]
- build(deps): bump github.com/goccy/go-yaml from 1.18.0 to 1.19.0 bf42138 @dependabot[bot]
- build(deps): bump github.com/olekukonko/tablewriter from 1.1.1 to 1.1.2 57fecb6 @dependabot[bot]
- build(deps): bump github.com/JohannesKaufmann/html-to-markdown/v2 6d0ab6a @dependabot[bot]
- b...
v0.152.2
In v0.152.0 we tightened the source validation for file mounts. We always said that project mounts can mount with absolute file/directorynames, modules/themes are restricted to relative. In v0.152.0 we narrowed module/themes mounts to be local, which made the setup in the bug report listed below fail:
[[module.mounts]]
source = '../../node_modules/bootstrap'
target = 'assets/vendor/bootstrap'One part of this is security. But the construct above is usually very odd (the project uses files in a theme/module, not the other way around) and not very portable. But the example above demonstrates a valid exception, that we now have added support for in a portable way. The above example now works as it did before v0.152.0, but going forward you can also write:
[[module.mounts]]
source = 'node_modules/bootstrap'
target = 'assets/vendor/bootstrap'We now have the node_modules as a special case: For themes/modules we first check if the mounted source exists locally, if not we try relative to the project root.
What's Changed
v0.152.1
These fixes are are all related to the YAML library upgrade in v0.152.0.
- Expand the numeric conversions to template funcs/methods e08278d @bep #14079
- Fix where with uint64 df4f80d @bep #14081
- Fix it so YAML integer types can be used where Go int types are expected d4c7888 @bep #14079
- tpl/compare: Fix compare/sort of uint64s 29e2c2f @bep #14078
- Fix "assignment to entry in nil map" on empty YAML config files 0579afc @bep #14074