v0.160.0
gohugoio/hugov0.160.0Apr 4, 2026by bep
AI Summary
Introduces CSS variable injection via `css.Build` and improves the `.Position` method for all render hooks, alongside several bug fixes.
Key Highlights
- Inject CSS vars from configuration into stylesheets using `css.Build`.
- Improved and extended `.Position` handling in Goldmark render hooks.
- Fix double-escaping of ampersands in Markdown link URLs.
- Refactor integration testing infrastructure.
New Features
- CSS variable injection support in `css.Build`.
- Enhanced `.Position` method for render hooks.
Full Release Notes
Now you can inject [CSS vars](https://gohugo.io/functions/css/build/#vars), e.g. from the configuration, into your stylesheets when building with [css.Build](https://gohugo.io/functions/css/build/). Also, now all the render hooks has a [.Position](https://gohugo.io/render-hooks/links/#position) method, now also more accurate and effective. ## Bug fixes * Fix some recently introduced Position issues 4e91e14c @bep #14710 * markup/goldmark: Fix double-escaping of ampersands in link URLs dc9b51d2 @bep #14715 * tpl: Fix stray quotes from partial decorator in script context 43aad711 @bep #14711 ## Improvements * all: Replace NewIntegrationTestBuilder with Test/TestE/TestRunning 481baa08 @bep * tpl/css: Support @import "hugo:vars" for CSS custom properties in css.Build 5d09b5e3 @bep #14699 * Improve and extend .Position handling in Goldmark render hooks 303e443e @bep #14663 * markup/goldmark: Clean up test 638262ce @bep ## Dependency Updates * build(deps): bump github.com/magefile/mage from 1.16.1 to 1.17.1 bf6e35a7 @dependabot[bot] * build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 0eda24e6 @dependabot[bot] * build(deps): bump golang.org/x/image from 0.37.0 to 0.38.0 beb57a68 @dependabot[bot] ## Documentation * readme: Revise edition descriptions and installation instructions 9f1f1be0 @jmooring