Releases: gohugoio/hugo
v0.131.0
Note that if you use Hugo's image processing, your processed images will get new (shorter!) file names when you build your site with this release. We have upgraded a third party hashing library to fix some rare but potential hash collisions, and since this would change some of the image hashes, we thought we might as well do some other related changes: We now use xxHash to create the image file hashes (very fast!) and we have removed the verbose processing information, making the filenames much shorter.
This release is also a full dependency refresh and it comes with one notable and very useful new feature. It is now possible to use permalinks
tokens in the front matter url
. See the documentation for more info. Thanks to @n1xx1 for the implementation.
Note
Bug fixes
Improvements
- revamp pagegroup tests with quicktest 914fa13 @n1xx1
- allow nested params when using Pages.GroupByParam and Pages.GroupByParamDate 51f09b1 @n1xx1
- Run go mod tidy a5db76f @bep
- resources/page: Expand parmalinks tokens in
url
566fe7b @n1xx1 #9714 - Bump to go 1.21 in go.mod 9257301 @bep
- tpl: Sync Go template packages with the Go 1.22.5 source 071f8b4 @bep
- Upgrade to Go 1.22.5 ae9d5e7 @bep
- Shorten processed image filenames 216a69a @bep #12688 #12656
- Consolidate all hashing to the common/hashing package e67886c @bep
- Replace the MD5 hashing of images with xxHash d5eda13 @bep
- resources: Add BenchmarkHashImage 8b5d796 @bep
- identity: Upgrade to github.com/mitchellh/hashstructure/v2 v2.0.2 78db8ae @bep #11644
- identity: Add BenchmarkHashString 3140e0b @bep
Dependency Updates
- build(deps): bump github.com/bep/godartsass/v2 from 2.0.0 to 2.1.0 be64358 @dependabot[bot]
- build(deps): bump google.golang.org/api from 0.152.0 to 0.189.0 20e4dd2 @dependabot[bot]
- build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1 f411499 @dependabot[bot]
- build(deps): bump gocloud.dev from 0.36.0 to 0.38.0 47fee83 @dependabot[bot]
- build(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.3 99665ef @dependabot[bot]
- build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.12 to 2.2.13 eb2eeee @dependabot[bot]
- deps: Upgrade github.com/hairyhenderson/go-codeowners v0.4.0 => v0.5.0 bea5a46 @bep
- build(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0 f1a7f3d @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.21.4 to 0.23.0 08243be @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.20.36 to 2.20.37 0490a8a @dependabot[bot]
- Revert "deps: Set toolchain go1.21.0 in go.mod" d795cac @bep
- deps: Set toolchain go1.21.0 in go.mod 78c9a18 @bep
- deps: Upgrade golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d => v0.23.0 79aa2ab @bep
- deps: Replace github.com/mitchellh/hashstructure/v2 with github.com/gohugoio/hashstructure c9d7577 @bep #11644
- deps: Upgrade github.com/bep/imagemeta v0.7.4 => v0.7.5 9989404 @bep
- deps: Upgrade github.com/aws/aws-sdk-go-v2 v1.26.1 => v1.30.3 b81ba2a @bep
- deps: Upgrade to github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 afdd87d @bep
v0.130.0
v0.129.0
This release brings a rewrite of the logic around browser refreshes when running hugo server
. We have seen some situations where asset changes (e.g. image/CSS/JS) has not been refreshed reliably in all browsers, even with the developer console open and the cache disabled. We suspect this comes from a recent browser bug (typically: Works fine in Safari, does not refresh in Chrome). The strategy we've been using when a change triggers multiple changes (e.g. both HTML and CSS) is to do one "browser force refresh", which in LiveReload ends up as a window.location.reload()
. With this release we:
- Are more specific about what we refresh, but fall back to "force refresh" for bigger change sets.
- INFO log exactly what we do in these situations with the prefix
livereload
.
Start the server with:
hugo server --logLevel info
And you should see how Hugo handles browser updates when you change content/templates etc.
A related tip; start the server with
hugo server --logLevel info -N
Hugo will navigate to the content file you're changing and log it in the console.
Also new in this release a new xxHash hashing function that is much faster than any of the other hashing functions in Hugo, especially for larger inputs.
Note
We have upgraded the integration with Git used to load GitInfo to be part of Hugo's Security Policy. We have added git
to the default whitelist, but if you have a custom security policy, you may have to update that.
Bug fixes
- commands: Fix --navigateToChanged server behavior when editing headless content cc2d19e @bep #12648
- commands: Fix hugo mod get -u ./... 251a23e @bep #12625
Improvements
- tpl: Use xxHash instead of MD5 to hash the deferred templates 4d8bfa7 @bep
- Throw error if resources.PostProcess is used in a deferred template f0ed91c @bep #12655
- commands: Simplify the browser live reload logic 094f746 @bep #12643
- Use xxHash for the change detector fb8909d @bep #12643
- source: Expose GitInfo Body 0ee2610 @PeskyPotato #10905
- Add hash.XxHash 644d554 @bep #12635
Dependency Updates
v0.128.2
v0.128.1
v0.128.0
This release brings TailwindCSS v4 (alpha) support. For more info about the TailwindCSS 4 integration, see this repo. Also notable is the new templates.Defer template func and the dramatically improved performance of $page.GetTerms
for bigger sites.
Bug fixes
- tpl/debug: Fix reset of debug timers when running the server c880faa @bep #12621
- Fix Erroridf/Warnidf mixed case issue 8731d88 @bep #12617
- Fix live reload when both CSS and HTML changes ad6d91c @bep #12600
- config: Fix typo 7ee36b3 @razonyang
Improvements
- Add css.TailwindCSS e1317dd @bep #12618 #12620
- Clean up the css related template funcs package structure eddcd2b @bep #12618
- modules: Remove newly introduced "mount source" does not exist warning 16e4662 @bep
- Implement defer 6cd0784 @bep #8086 #12589
- common/hexec: Fall back to the binary in PATH if npx fails 1c85830 @bep #12486
- deploy: Add stripIndexHtml target option d5542ed @depp #12607
- Speed up GetTerms 478a910 @bep #12610
- markup/goldmark: Add the Hugo Goldmark Extras "delete" extension 8efc75b @jmooring #12597
- resources: Update Dart Sass error message 57165d4 @jmooring
- resources/page: Deprecate PageSize in favor of PagerSize 9c3143c @bep #12572
- Rename DefaultPageSize => PagerSize 9f22bc4 @bep
- resources/page: Let GroupByParam return nil instead of error cba2de6 @jmooring #12578
- Add option to not generate aliases for first page of pagination pages 9c4e14e @bep #12572
- js: Support more recent targets with js.Build / esbuild 1cdd3d0 @bep #12575
Dependency Updates
- deps: Upgrade github.com/yuin/goldmark v1.7.2 => v1.7.4 79da24a @jmooring
- deps: Upgrade github.com/yuin/goldmark-emoji v1.0.2 => v1.0.3 b187c06 @jmooring
- deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0 8cf94ae @jmooring #12580
- deps: Upgrade github.com/evanw/esbuild v0.20.2 => v0.21.4 b57306d @bep #12575
Build Setup
Documentation
v0.127.0
This release brings proper HTTP caching and live reloading of remote resources fetched with resources.GetRemote, especially useful when used with content adapters.
Note that this isn't enabled out of the box, so if you need this, you need to add some configuration. The demo below is configured as:
[httpcache]
[httpcache.cache]
[httpcache.cache.for]
includes = ['https://sheets.googleapis.com/**']
[[httpcache.polls]]
low = '1s'
high = '30s'
[httpcache.polls.for]
includes = ['https://sheets.googleapis.com/**']
hugodemo__v0127.mp4
What's Changed
v0.126.3
- content adapter: Fix site.GetPage using the base part of the path 917199a @bep #12561
- resources/page: Deprecate .Sites.First in favor of .Sites.Default c8dac67 @jmooring #12513
- metrics: Increase maximum length of cumulative duration to 15 0068f03 @razonyang
- content adapter: Handle more separator in content.value 0221ddb @bep #12556
v0.126.2
Bug fixes
- content adapter: Fix server crash on partial edit 1464091 @bep #12538
- content adapter: Fix issue with content starting out with a shortcode 519f41d @bep #12544
- tpl/tplimpl: Resolve render hook destinations with leading ./ b893a09 @jmooring #12514
Improvements
- Delete .github/workflows/test-dart-sass-v1.yml 2c88e45 @bep
- commands: Add shorthand flags -M (--renderToMemory) and -N (--navigateToChanged) eaa42a8 @bep #12530
- content adapter: Add support for menus in AddPage 245928a @bep #12507
- hugolib: Allow override of sitemap file name 7f30617 @jmooring #12525
- commands: Improve list command 931e096 @jmooring #12520
- config: Remove extraneous BuildConfig setting 548dc21 @jmooring #12519
- Also warn about duplicate content paths with --printPathWarnings 6b00661 @bep #12511