Releases: gohugoio/hugo
v0.150.0
The big new feature in this relase is the new version config option on Module imports, which allows you to set the requested module version query directly in your Hugo configuration (e.g. hugo.toml). This is a feature that have been requested by many, and I (@bep) was reminded about it by this recent thread, which also outlines a common use case for this: Mounting multiple old versions/branches of API documentation into the project.
What's Changed
- build(deps): bump golang.org/x/mod from 0.27.0 to 0.28.0 d1f6a1d @dependabot[bot]
- modules: Add support for direct version module imports in hugo.toml 747cf4a @bep #13964
- resources/page: Fix truncated summary logic d8774d7 @jmooring #13967 #13968
- config/security: Add PROGRAMDATA to the osenv allowlist 3b8947d @jmooring
v0.149.1
The main motivation behind this release is the Go 1.25.1 upgrade, which comes with a security fix. Hugo does not use the feature in question, but we understand that many Hugo users like to have a clean security report.
Note
Note that CSS minification now targets CSS3, removing certain optimizations that were specific to CSS2.
What's Changed
- Remove noindex meta tag from alias.html 25c0f24 @lzap
- Fix nilpointer on ToC heading 4f2d2b2 @bep #11843
- tpl/collections: Require collections.D args to be ints b8eb45c @bep #13952
- Upgrade to Go 1.25.1 1d90aff @bep #13960
- Fix config env handling for some slice options e751afa @PikachuTW #13950
- minifiers: Update deprecation handling a09b8a6 @jmooring #11893 #13947 #13948
v0.149.0
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,
:sectionslugand:sectionslugs, especially useful in multilingual Hugo projects. - A new
--omitClassCommentsflag onhugo gen chromastyles - Several improvements to how ToC from Markdown gets rendered, see #13401 and #12605.
- A new
formatoption 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
Documentation
v0.148.2
What's Changed
- tpl: Add test for recent template selection regression 7ff5ec7 @bep #13868
- Revert "hugolib: Honor implicit "page" type during template selection" 3937ab2 @bep #13868
- Fix regression with hyphenated codeblock templates, e.g. render-codeblock-go-html-template.html 9c57af1 @bep #13864
- commands: Avoid full browser refresh on simple CSS changes d240a70 @bep
v0.148.1
v0.148.0
Note
There's some minor breaking changes in this release. Please read this thread for more information.
Note
- Fix some uglyURLs issues for home, section and taxonomy kind (note) b8ba33c @bep #4428 #7497
- Fix branch paths when OutputFormat.Path is configured (note) f967212 @bep #13829
Bug fixes
Improvements
- Add Ancestors (plural) method to GitInfo, rename Ancestor field to Parent 3e2f1cd @bep #13839
- Allow creating home pages from content adapters bba6996 @bep
- Remove the internal GitInfo type and make Page.GitInf() return a pointer 90d397b @bep #5693
- source: Expose Ancestor in GitInfo 61e6c73 @jenbroek #5693
- config: Increase test coverage 266d46d @pixel365
- markup/goldmark: Change link and image render hook enablement to enums 84b3172 @jmooring #13535
- hugolib: Honor implicit "page" type during template selection cfc8d31 @jmooring #13826
- deploy: walkLocal worker pool for performance dd6e2c8 @davidejones
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.25.5 to 0.25.6 0a5b870 @dependabot[bot]
- build(deps): bump github.com/olekukonko/tablewriter from 1.0.7 to 1.0.8 94e2c27 @dependabot[bot]
- build(deps): bump github.com/niklasfasching/go-org from 1.8.0 to 1.9.0 e77b2ad @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.18.0 to 2.19.0 9487acf @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.32.0 to 0.34.0 1e9a0b9 @dependabot[bot]
v0.147.9
Improvements and fixes
- Remove WARN with false negatives 6a4a3ab @bep #13806
- resources/page: Make sure a map is always initialized 36f6f98 @bep #13810
- tpl/tplimpl: Copy embedded HTML table render hook to each output format 18a9ca7 @jmooring #13351
- tpl/tplimpl: Change resources.GetRemote errors to suppressible warnings b6c8dfa @jmooring #13803
- common/terminal: Enable color output on windows 4217fee @jmooring #8209
- hugolib: Remove test for deprecated future 4ef5720 @bep
Dependency Updates
- build(deps): bump google.golang.org/api from 0.221.0 to 0.237.0 621ea42 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.36.1 to 1.36.4 34e8378 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.27.0 to 0.28.0 4d3ebe4 @dependabot[bot]
- deps: Upgrade github.com/spf13/cast v1.8.0 => v1.9.2 b5c0383 @jmooring
v0.147.8
The primary motivation behind this release is to get the Docker package security patched and up to date.
Improvements
- dockerfile: Update Alpine 8e61f1f @bep #13783
- dockerfile: Update Go version f37412a @bep #13780
- hugolib: Emit ignorable warning when home page is a leaf bundle 01241d5 @jmooring #13538
- all: Replace _build with build in tests 32eb1a8 @bep
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.25.3 to 0.25.5 21a4a9a @dependabot[bot]
- build(deps): bump github.com/niklasfasching/go-org from 1.7.0 to 1.8.0 7a4a479 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.39.0 to 0.40.0 54065b7 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.7.11 to 1.7.12 e333836 @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.23.5 to 2.23.8 cc7bfee @dependabot[bot]
v0.147.7
Bug fixes
- Fix language handling in shortcode templates 5273a88 @bep #13767
- Make sure that unreferenced but changed bundle resources gets republished 766a2e7 @bep #13748
- resources/page: Respect disablePathToLower for permalink tokens 843ffeb @jmooring #13755
Improvements
- Handle KaTeX warnings (#13760) 6334948 @bep #13735
- common/collections: Increase test coverage bff5d19 @pixel365
- parser/pageparser: Add coverage for all IsX methods of Item da370d3 @pixel365
- resources: Remove unused interface 6bd328c @bep
Dependency Updates
- build(deps): bump golang.org/x/image from 0.26.0 to 0.27.0 7525963 @dependabot[bot]
- build(deps): bump golang.org/x/text from 0.24.0 to 0.25.0 0df9f35 @dependabot[bot]
- build(deps): bump github.com/spf13/cast from 1.7.1 to 1.8.0 302e6a7 @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.17.2 to 2.18.0 202fe0d @dependabot[bot]
- deps: Upgrade github.com/olekukonko/tablewriter v0.0.5 => v1.0.7 13e1617 @bep
v0.147.6
What's Changed
- Improve warning message on superfluous prefix when using function 'partials.Include' e57dcd3 @deining
- Fix recent regression with cascading of params to content adapters eaf5ace @bep #13743
- Fix it so e.g. de in layouts/_shortcodes/de.html is not interpreted as a language code 9ad26b6 @bep #13740
- commands: Make sure the browser gets refreshed on changes when --disableFastRender is set f471936 @bep #13727
- tpl/transform: Expose the KaTeX strict option 013c8cf @jmooring #13729