Note
If running on Netlify, make sure you have configured your build with their latest build image, see this issue.
Hugo v0.149.0
comes with bug fixes and a set of new features/improvements, notably:
- We now build with the recently released Go 1.25
- A new collections.D template function that generates random sequences of integers using J. S. Vitter’s Method D, by some called The Best Algorithm No One Knows About.
- Two new permalinks tokens,
:sectionslug
and:sectionslugs
, especially useful in multilingual Hugo projects. - A new
--omitClassComments
flag onhugo gen chromastyles
- Several improvements to how ToC from Markdown gets rendered, see #13401 and #12605.
- A new
format
option in transform.Unmarshal
Note
Bug fixes
- create: Fix new content command with future dates bb4e66c @justuswilhelm #12599
- Fix server rebuild when adding a new leaf bundle with resources in one go 13b43e6 @bep #13925
- Fix rebuild when deleting a content adapter file 87e100e @bep
Improvements
- tpl/collections: Add an integration test for collections.D 84b5123 @bep
- tpl/collections: Add collections.D using Vitter's Method D for sequential random sampling 1ba8087 @bep
- commands: Deprecate --omitEmpty on chromastyles command 61ec7a2 @bep
- commands: Add --omitClassComments to the chromastyles command c289fca @bep
- all: Use slices.Equal ecdef2b @minxinyi
- resources/page: Add :sectionslug and :sectionslugs permalink tokens 12ace3a @DustinFischer #13788
- Upgrade to Go 1.25 c14fddd @bep #13924 #13931
- common/hcontext: Replace with external package 186934f @bep
- resources/page: Use reflect.TypeFor bff4ddd @cuiweixie
- tpl/strings: Remove unnecessary error check 348aae9 @Nigel2392
- markup/goldmark: Apply Hugo Goldmark Extras when rendering TOC 61482cf @jmooring #12605
- markup/goldmark: Sanitize TOC heading titles 5fdcc09 @jmooring #13401
- Add a key to the partialCached deadlock prevention 2216028 @n1xx1 #13889
- transform: Add support for "format" option in transform.Unmarshal ecc3dd1 @n1xx1 #13887
- Skip flakey test on CI de4a7f1 @bep
Dependency Updates
- build(deps): bump github.com/getkin/kin-openapi from 0.132.0 to 0.133.0 45ec2f8 @dependabot[bot]
- build(deps): bump google.golang.org/api from 0.247.0 to 0.248.0 84dd495 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.25.6 to 0.25.9 327bbc6 @dependabot[bot]
- build(deps): bump gocloud.dev from 0.40.0 to 0.43.0 2447138 @dependabot[bot]
- deps: Upgrade github.com/alecthomas/chroma/v2 v2.19.0 => v2.20.0 cfc38ec @bep #13917
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront 22e579e @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.23.11 to 2.24.0 b886615 @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.23.8 to 2.23.11 885cd29 @dependabot[bot]
- build(deps): bump github.com/olekukonko/tablewriter from 1.0.8 to 1.0.9 debf3c5 @dependabot[bot]
- build(deps): bump google.golang.org/api from 0.237.0 to 0.247.0 1649f31 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.36.4 to 1.38.0 ccd6a4b @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.35.0 to 0.36.0 6dc1a17 @dependabot[bot]
- build(deps): bump github.com/bep/simplecobra from 0.6.0 to 0.6.1 806d484 @dependabot[bot]
- build(deps): bump golang.org/x/mod from 0.25.0 to 0.27.0 04ee1b9 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.7.12 to 1.7.13 7a86fe9 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.28.0 to 0.30.0 f5245a7 @dependabot[bot]
- deps: Upgrade github.com/niklasfasching/go-org v1.8.0 => v1.9.1 5029676 @jmooring #13846