Releases: gohugoio/hugo
v0.159.0
This release greatly improves and simplifies management of Node.js/npm dependencies in a multi-module setup. See this page for more information.
Note
- Replace deprecated site.Data with hugo.Data in tests a8fca59 @bep
- Replace deprecated excludeFiles and includeFiles with files in tests 182b104 @bep
- Replace deprecated :filename with :contentbasename in the permalinks test eb11c3d @bep
Bug fixes
Improvements
- create: Return error instead of panic when page not found 807cae1 @mango766 #14112
- commands: Preserve non-content files in convert output c4fb61d @xndvaz #4621
- npm: Use workspaces to simplify
hugo mod npm packd88a29e @bep - commands: Close cpu profile file when StartCPUProfile fails 9dd9c76 @buley
- Remove the AI Watchdog workflow for now 3315a86 @bep
- Remove 'bep' from PR user logins skip list 3824484 @bep
- tpl/tplimpl: Comment out the Vimeo simple shortcode tests 7813c5c @bep #14649
Dependency Updates
- build(deps): bump github.com/olekukonko/tablewriter from 1.1.3 to 1.1.4 (#14641) 3ff9b7f @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.7.16 to 1.7.17 be93ccd @dependabot[bot]
- build(deps): bump github.com/magefile/mage from 1.15.0 to 1.16.1 2669bca @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.36.0 to 0.37.0 753d447 @dependabot[bot]
- build(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.3 4f39d72 @dependabot[bot]
Documentation
v0.158.0
This release adds css.Build, native and very fast bundling/transformation/minifying of CSS resources. Also see the new strings.ReplacePairs, a very fast option if you need to do many string replacements.
Notes
- Upgrade to to Go 1.26.1 (#14597) (note) 1f578f1 @bep #14595. This fixes a security issue in Go's template package used by Hugo: https://www.cve.org/CVERecord?id=CVE-2026-27142
Deprecations
The methods and config options are deprecated and will be removed in a future Hugo release.
Also see this article
Language configuration
languageCode→ Uselocaleinstead.languages.<lang>.languageCode→ Uselanguages.<lang>.localeinstead.languages.<lang>.languageName→ Uselanguages.<lang>.labelinstead.languages.<lang>.languageDirection→ Uselanguages.<lang>.directioninstead.
Language methods
.Site.LanguageCode→ Use.Site.Language.Localeinstead..Language.LanguageCode→ Use.Language.Localeinstead..Language.LanguageName→ Use.Language.Labelinstead..Language.LanguageDirection→ Use.Language.Directioninstead.
Bug fixes
- tpl/css: Fix external source maps e431f90 @bep #14620
- hugolib: Fix server no watch 59e0446 @jmooring #14615
- resources: Fix context canceled on GetRemote with per-request timeout 842d8f1 @bep #14611
- tpl/tplimpl: Prefer early suffixes when media type matches 4eafd9e @bep #13877 #14601
- all: Run go fix ./... e310822 @bep
- internal/warpc: Fix SIGSEGV in Close() when dispatcher fails to start c9b88e4 @bep #14536
- Fix index out of range panic in fileEventsContentPaths f797f84 @bep #14573
Improvements
- resources: Re-publish on transformation cache hit 3c980c0 @bep #14629
- create/skeletons: Use css.Build in theme skeleton 404ac00 @jmooring #14626
- tpl/css: Add a test case for rebuilds on CSS options changes 06fcb72 @bep
- hugolib: Allow regular pages to cascade to self 9b5f1d4 @jmooring #14627
- tpl/css: Allow the user to override single loader entries 623722b @bep #14623
- tpl/css: Make default loader resolution for CSS @import and url() always behave the same a7cbcf1 @bep #14619
- internal/js: Add default mainFields for CSS builds 36cdb2c @jmooring #14614
- Add css.Build 3e3b849 @bep #14609 #14613
- resources: Use full path for Exif etc. decoding error/warning messages c47ec23 @bep #12693
- Move to new locales library and upgrade CLDR from v36.1 to v48.1 4652ae4 @bep
- tpl/strings: Add strings.ReplacePairs function 13a95b9 @jmooring #14594
- github: Remove pull_request_template.md 54c8048 @bep
- testing: Make commands tests pass in Go 1.26.1 157bfdd @bep
- refactor: Deprecate language configuration and template methods d4f2122 @jmooring #14269
- Replace Exif with Meta in tests 991d2f9 @bep
- resources: Improve getImageOps error message e857777 @jmooring #14571
- resources/images: Add IsImageResourceWithMeta etc. tests for bmp and gif 44dc384 @bep #14568
Dependency Updates
- deps: Upgrade github.com/evanw/esbuild v0.27.3 => v0.27.4 0e46a97 @bep
- build(deps): bump github.com/getkin/kin-openapi from 0.133.0 to 0.134.0 c27d9e8 @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.42.0 to 0.43.0 098eac5 @dependabot[bot]
- build(deps): bump gocloud.dev from 0.44.0 to 0.45.0 87f8de8 @dependabot[bot]
- build(deps): bump golang.org/x/sync from 0.19.0 to 0.20.0 67ef6c6 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.50.0 to 0.51.0 (#14569) b29c2f7 @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.24.9 to 2.24.10 (#14585) e91d191 @dependabot[bot]
- build(deps): bump github.com/bep/imagemeta from 0.15.0 to 0.17.0 (#14584) a8a54bd @dependabot[bot]
v0.157.0
The notable new feature is GitInfo support for Hugo Modules. See this repo for a runnable demo where multiple versions of the same content is mounted into different versions.
Bug fixes
- Fix menu pageRef resolution in multidimensional setups 3dff7c8 @bep #14566
- docs: Regen and fix the imaging docshelper output 8e28668 @bep #14562
- hugolib: Fix automatic section pages not replaced by sites.complements a18bec1 @bep #14540
Improvements
- Handle GitInfo for modules where Origin is not set when running go list d98cd4a @bep #14564
- commands: Update link to highlighting style examples 6805997 @jmooring #14556
- Add AVIF, HEIF and HEIC partial support (only metadata for now) 49bfb10 @bep #14549
- resources/images: Adjust WebP processing defaults b7203bb @jmooring
- Add Page.GitInfo support for content from Git modules dfece5b @bep #14431 #5533
- Add per-request timeout option to
resources.GetRemote2d691c7 @vanbroup - Update AI Watchdog action version in workflow b96d58a @bep
- config: Skip taxonomy entries with empty keys or values 65b4287 @bep #14550
- Add guideline for brevity in code and comments cc338a9 @bep
- modules: Include JSON error info from go mod download in error messages 3850881 @bep #14543
Dependency Updates
- build(deps): bump github.com/tdewolff/minify/v2 from 2.24.8 to 2.24.9 9869e71 @dependabot[bot]
- build(deps): bump github.com/bep/imagemeta from 0.14.0 to 0.15.0 8f47fe8 @dependabot[bot]
v0.156.0
This release brings significant speedups of collections.Where and collections.Sort – but this is mostly a "spring cleaning" release, to make the API cleaner and simpler to understand/document.
Deprecated
- Site.AllPages is Deprecated
- Site.BuildDrafts is Deprecated
- Site.Languages is Deprecated
- Site.Data is deprecated, use hugo.Data
- Page.Sites and Site.Sites is Deprecated, use hugo.Sites
See this topic for more info.
Removed
These have all been deprecated at least since v0.136.0 and any usage have been logged as an error for a long time:
Template functions
- data.GetCSV / getCSV (use resources.GetRemote)
- data.GetJSON / getJSON (use resources.GetRemote)
- crypto.FNV32a (use hash.FNV32a)
- resources.Babel (use js.Babel)
- resources.PostCSS (use css.PostCSS)
- resources.ToCSS (use css.Sass)
Page methods:
- .Page.NextPage (use .Page.Next)
- .Page.PrevPage (use .Page.Prev)
Paginator:
- .Paginator.PageSize (use .Paginator.PagerSize)
Site methods:
- .Site.LastChange (use .Site.Lastmod)
- .Site.Author (use .Site.Params.Author)
- .Site.Authors (use .Site.Params.Authors)
- .Site.Social (use .Site.Params.Social)
- .Site.IsMultiLingual (use hugo.IsMultilingual)
- .Sites.First (use .Sites.Default)
Site config:
- paginate (use pagination.pagerSize)
- paginatePath (use pagination.path)
File caches:
- getjson cache
- getcsv cache
Notes
- Remove items deprecated <= v0.136.0 (note) af5051e @bep
- hugolib: Move site.Data to hugo.Data, deprecate Site.AllPages/BuildDrafts/Languages 86aa625 @bep #14521
- hugolib: Add Page.Sites to Site.Sites deprecation notice 4148ede @jmooring #14532
- resources/page: Deprecate cascade._target in favor of cascade.target 828ee72 @jmooring #14341
- tpl/tplimpl: Throw error when calling gist shortcode 4384f9b @jmooring #14491
- tpl/tplimpl: Throw error when calling twitter/twitter_simple shortcodes 55d136d @jmooring #14488
Bug fixes
- tpl/internal: Replace deprecated parser.ParseDir and doc.New 4a641d1 @bep #14513
- commands: Fix --panicOnWarning flag having no effect with module version warnings 3f9d0ad @bep #14524
- paths: Fix handling of _ as a path name 32027e5 @khayyamsaleem #14344
- docs: Fix lineNos default value in docs.yaml 498431d @jmooring
- hugolib: Fix term title when taxonomy name contains spaces 773664b @bep #13422
Improvements
- hugolib: Simplify sites collection bba2aed @bep
- hugolib: Adjust hugo.Sites.Default 29b8e17 @bep #14531
- Move common/hugo/HugoInfo to resources/page 3c82340 @bep
- hugolib: Add hugo.Sites and .Site.IsDefault(), modify .Site.Sites ab62320 @jmooring #14479 #14481
- output: Remove unused method 8d19f5a @bep #14522
- Update AI assistance guidelines in CONTRIBUTING.md 7729473 @bep
- tpl/collections: Speed up where and sort performance 47e39af @bep
- commands: Skip chmod for files without owner-write permission 7850e7c @jmooring #14507
- tpl/collections: Add some more benchmarks for where and sort 2e5132d @bep
- all: Change site to project where appropriate 19ab3f5 @jmooring #14504
- markup/highlight: Allow lineNos to be true, false, "inline", or "table" 3158a51 @jmooring #13481
- Upgrade to Go 1.26 b358a65 @bep
- tpl: Move from md5 to xxhash for some in memory keys 8ae5e1a @bep
- testscripts/commands: Update 'future' date to far future e277659 @toddy15 #14486
Dependency Updates
- build(deps): bump google.golang.org/api from 0.255.0 to 0.267.0 d8ec0ee @dependabot[bot]
- build(deps): bump github.com/bep/textandbinarywriter 21be4af @dependabot[bot]
- build(deps): bump github.com/bep/simplecobra from 0.6.1 to 0.7.0 e549016 @dependabot[bot]
- build(deps): bump github.com/bep/tmc from 0.5.1 to 0.6.0 a392906 @dependabot[bot]
- build(deps): bump github.com/gohugoio/hugo-goldmark-extensions/extras 86786c9 @dependabot[bot]
- build(deps): bump github.com/gohugoio/hugo-goldmark-extensions/passthrough 7a7308a @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.41.0 to 0.42.0 2d1d731 @dependabot[bot]
- build(deps): bump github.com/bep/helpers from 0.6.0 to 0.7.0 b26fbf8 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.35.0 to 0.36.0 7358309 @dependabot[bot]
Build Setup
- snap: Stop building for ppc64el and s390x e6f01bb @jmooring #14519
- Reapply "release: Support alpha, beta, and RC releases" de0c9f3 @jmooring #14466
Documentation
v0.155.3
What's Changed
- hugolib: Don't render default site redirect for non-primary isHTML output formats 6ac7d08 @bep #14482
- server: Fix stuck server global error logging 24eb84f @bep #14469
- build(deps): bump github.com/evanw/esbuild from 0.27.2 to 0.27.3 95a3678 @dependabot[bot]
- server: Fix panic when the server browser error handler tried to use a config in a state of flux 9045797 @bep #14470
v0.155.2
Note that the bug fix below is for the two new dimensions introduced in v0.153.0 (version and role), multiple languages worked fine. Also, changes to the first version and role also worked, which had me head-scratching for a while. Oh, well, enjoy.
v0.155.1
v0.155.0
Some notable new things in this release are:
- Improvements to how versions are handled: We now support version (and also for the other dimension) range queries (e.g.
>= v1.0.0), and we now cache Go module version queries, which makes mounting multiple versions of the same GitHub repo with different version much more practical and enjoyable, se this site and config for an annotated example. - We finally have XMP and IPTC image metadata support, in addition to EXIF, see #13146
- Page
aliasesnow works in multidimensional sites (e.g. multiple languages), and it is now much easier to create e.g. Netlify_redirectsfiles that works in such setups. - There are several performance related WebP improvements in this release.
- Also, image processing in general (e.g. resize operations) should be considerably more effective.
Breaking change
Prior to v0.155.0, alias paths beginning with a slash (/) were treated as server-relative. In v0.155.0 and later, they are now site-relative. This change only affects multilingual single-host projects that used alias paths beginning with a slash (/) to cross language boundaries. See details.
Note
Bug fixes
- Fix data race when clearing cache in cachebusters 8a979d5 @wjiec
- resources/images: Fix comment for Quality field in ImageConfig fd49df8 @bep
- Fix panic reported in discourse c7b35c8 @bep #14441
- Fix recently introduced partial rendering bug 8dfcece @bep #14433
- tpl: Fix partial decorator panic when partial returns falsy f472dd4 @simonheimlicher #14419
- resources: Fix race condition in test helper 48566b6 @simonheimlicher
- Fix cascade draft panic 11f7f39 @bep #14409 #14412
- hugolib: Fix multilingual alias generation 5ba03bf @jmooring #14388
- Fix file mount specifity issue within the same module c1b2e58 @bep #14405
- warpc: Fix typed nil return in Start 2c61109 @Sam-404-404 #14372
- hugolib: Fix relative alias generation 32334d0 @jmooring #14381
Improvements
- Remove disableDate and disableLatLong from MetaConfig 5916b61 @bep #14437
- internal/warpc: Make webp C defaults match the Go defaults 7eafef2 @bep
- testscripts: Move server tests to own folder 00c4228 @bep #14439
- testing: Skip some slow tests when not running in CI 5f5b2f3 @bep #14438
- magefile: Skip commands test when running mage check locally ef7a22a @bep
- Remove -p 2 parallelism limit for local test runs 9a6bfe2 @bep
- Add AGENTS.md and CLAUDE.md 0fc63fb @bep
- Add == and != operators to range predicates 50973e7 @bep
- Add modulequeries file cache for module version queries b441472 @bep #14417
- Allow v1,v2 etc. style version names while still supporting full semver in queries ac2c3fb @bep #14414
- Add range matchers for site matrix vector store filtering 192e3c4 @bep #14359
- Misc webp performance work e569dd5 @bep #14370
- Move from github.com/disintegration/gift to github.com/gohugoio/gift 1a94731 @bep #14397
- resources/images: Stabilize order of valid sources in error message 8e9e04e @jmooring #14390
- Add XMP and IPTC image metadata support 8e2e60d @bep #13146
- output: Add TestCanonical integration test 2bc54df @bep
- Rename common/maps to common/hmaps (#14384) 608ed09 @bep
- Decode webp.ImageConfig natively d36a8f5 @bep #14371
Dependency Updates
- build(deps): bump golang.org/x/tools from 0.40.0 to 0.41.0 7d45614 @dependabot[bot]
- build(deps): bump github.com/olekukonko/tablewriter from 1.1.2 to 1.1.3 7f12c09 @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.23.0 to 2.23.1 dab2c33 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront 576d55d @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.34.0 to 0.35.0 b9400b8 @dependabot[bot]
- build(deps): bump golang.org/x/mod from 0.31.0 to 0.32.0 ce0c7f4 @dependabot[bot]
- deps: Upgrade github.com/gohugoio/gift v0.1.0 => v0.2.0 7721411 @bep
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.22.0 to 2.23.0 1878471 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.48.0 to 0.49.0 94f1ede @dependabot[bot]
- build(deps): bump github.com/bep/lazycache from 0.8.0 to 0.8.1 ab374e3 @dependabot[bot]
- deps: Upgrade github.com/alecthomas/chroma v2.21.1 => v2.22.0 1a91330 @jmooring #14368
Build Setup
Documentation
v0.154.5
v0.154.4
What's Changed
- tpl: Fix language resolution for markdown shortcodes ec178ea @BarkinBalci #14098
- For multiple dimensions setups, fix alias handling and multihost publish path 2d80b8a @bep #14354 #14356
- build(deps): bump github.com/goccy/go-yaml from 1.19.1 to 1.19.2 a2b2a5a @dependabot[bot]
Also see the new Page.OutputFormats.Canonical method.