Releases: gohugoio/hugo
v0.120.1
v0.120.0
This is a full dependency refresh and a couple of new cool features:
A new Padding image filter, and a new debug.Timer template func. The new debug.Timer
is useful for finding performance bottle necks in templates:
If you then run hugo --logLevel info
you should see timer info logged at the end of the build. You can have as many timers as you want and if you don't stop them, they will be stopped at the end of build.
Hugo now also builds release binaries for Solaris now that a long-living issue in the upstream ƒsnotify library has been fixed, thanks to @nshalman.
Notes
- The
enableEmoji
flag now only works for Markdown content. This is unfortunate, but the old solution has some known issues and it was too hard to make it work properly as a general thing across all formats. See #11598 site.DisqusShortname is deprecated
2eca1b3site.GoogleAnalytics
is deprecated a692278site.Author
is deprecated d4016ddsite.Social
is deprecated 4910312
Also, we have changed the string type for some of the fields and methods:
- .Fragments.ToHTML now returns
template.HTML
$resource.Data.Integrity
now returns astring
and not atemplate.HTMLAttr
delimit
now returns astring
and not atemplate.HTML
See #10876 #11502.- the URL functions now returns a
string
, see #11536 - The paginator
Pager
now returns astring
. site.BaseURL
now returns astring
.
The above should both solve some issues and make the above types more useful and easer to reason about. But if you use the delimit
function to process HTML and see some unexpected escaping after this release, e.g.:
Then you need to mark the type with safeHTML
:
Bug fixes
- create/skeletons: Fix menu template acf01bf @jmooring #11519
- Fix so hugo get -u updates transitively de4e466 @razonyang
- tpl/tplimpl: Fix dropped error 6251626 @alrs
- tpl/collections: Fix and deprecate echoParams 75f56b4 @jmooring #11498
Improvements
- Add Solaris build 7f8ab74 @bep #3500
- Make site.BaseURL and $pager.URL a string b6a7568 @bep
- commands/new: Remove format flag from new content cmd 27b22cd @jmooring #11462
- hugolib: Display correct markup identifier in error message a2488b1 @jmooring #11538
- livereloadinject: Save some allocations 8f60c0c @bep
- livereloadinject: Use more robust injection method 9dc6080 @DominoPivot
- tpl/urls: Return strings from URL functions a349aaf @jmooring #11511
- transform/livereloadinject: Add benchmark b8fbd4a @bep
- Revert "modules: Throttle the "downloading modules …" log entries" 28d8446 @bep
- Revert "modules: Adjust the log throttle logic a little" eb5fd31 @bep
- resources/images: Create padding image filter 3ed28e4 @jmooring #11599
- markup/goldmark: Update the CJK extension to allow specifying line break styles db14238 @henry0312
- modules: Adjust the log throttle logic a little 3f64b5a @bep
- modules: Throttle the "downloading modules …" log entries 6690409 @bep
- tpl/collections: Make delimit return a string e54139c @bep #10876 #11502
- Revise the deprecation logging 71fd79a @bep
- Remove rest of the now unused emoji code c4a530f @bep #11598
- markdown: Pass emoji codes to yuin/goldmark-emoji 272484f @jmooring #7332 #11587 #11598
- watcher/filenotify: Remove redundant duplicated comments c23a0c4 @alexandear
- tpl/debug: Add average and median to timer output 46bdc03 @bep
- tpl/debug: Add debug.Timer 5160c7e @bep #11580
- Add some convenient integration test helpers fd38171 @bep
- hugolib: Deprecate .Site.DisqusShortname 2eca1b3 @jmooring
- hugolib: Deprecate .Site.GoogleAnalytics a692278 @jmooring
- tpl/tplimpl: Deprecate .Site.Author usage in RSS template d4016dd @jmooring
- tpl/tplimpl: Deprecate .Site.Social usage with internal templates 4910312 @jmooring
- markup/tableofcontents: Return template.HTML from .Fragments.ToHTML 1b5f78b @jmooring #11545
- commands: Update message displayed when running CLI from GUI 5993afa @jmooring #11525
- common/hugo: Add hugo.IsServer and hugo.IsDevelopment d1b4458 @jmooring #11510
- all: Format files with gofmt 274852b @alexandear
- magefile: Update isGoLatest to check for Go 1.21 37a2d5e @abdullah-alaadine
- resources/integrity: Return string instead of template.HTMLAttr 4c95389 @jmooring #11513
- tpl/lang: Formally deprecate lang.NumFmt 46da0b7 @jmooring
Dependency Updates
- build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0 59bcc09 @dependabot[bot]
- build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0 e26ba75 @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.9.1 to 2.10.0 bcf07fa @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.13.0 to 0.14.0 e2b2092 @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.12.9 to 2.20.0 f4df7b8 @dependabot[bot]
- build(deps): bump github.com/mattn/go-isatty from 0.0.19 to 0.0.20 3d9bd40 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.12.0 to 0.13.0 5f5e55a @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0 8c61fd2 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.19.3 to 0.19.5 d3145e4 @dependabot[bot]
- build(deps): bump github.com/spf13/afero from 1.9.5 to 1.10.0 743a1da @dependabot[bot]
- build(deps): bump github.com/bep/logg from 0.2.0 to 0.3.0 123901b @dependabot[bot]
- deps: Update github.com/tdewolff/minify/v2 v2.12.7 => v2.12.9 d5d0f42 @jmooring #11533
Documentation
v0.119.0
This version is built with Go 1.21.1 which contains some relevant security fixes for the html/template
package, see Issue 62196 and Issue 62197. This is the main reason Hugo 0.119.0 is released sooner rather than later. But this release also comes with a dependency refresh and some useful image processing improvements:
Process
support all of the existing scaling operations, but it can also be used do simple format conversions (e.g. from JPG to PNG). A before/after example:
There are some issues with the above:
- The source image does not support transparency, so the transparency pixels will be filled with the configured background colour.
- The image will be decoded and encoded twice with a potential loss in quality.
- It's clumsy.
With Hugo 0.119.0 the above can be written as:
Bug fixes
Improvements
- common: Remove unused constants 6b65b2f @alexandear
- Add images.Process filter 6a246d1 @bep #8439
- Add $image.Process ef0e714 @bep #11483
- google_analytics_async.html: Add deprecation warning c32094a @carlmjohnson
- Add images.Opacity filter f9b3c0f @bep #11471
- Upgrade to Go 1.21.1 1e9b87f @bep #11474 #11414
- create/skeletons: Improve viewport meta tag f916315 @jmooring
- commands/gen: Remove default highlight style 75c0f88 @jmooring #11445
- Adjust baseline benchmarks 69f5bad @bep
- commands: Print language code after web server address info 525bed9 @ilmari-lauhakangas
Dependency Updates
- build(deps): bump golang.org/x/tools from 0.12.0 to 0.13.0 a262fd4 @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.8.0 to 2.9.1 f0d3245 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.19.2 to 0.19.3 e8bc8e6 @dependabot[bot]
- build(deps): bump github.com/aws/aws-sdk-go from 1.44.314 to 1.45.14 11fcda9 @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.118.0 to 0.120.0 f31375d @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.11.0 to 0.12.0 6415b59 @dependabot[bot]
Documentation
v0.118.2
v0.118.1
Note: There still seem to be an issue on Vercel.
This release only fixes a GLIBC_xxx not found
issue with the Linux AMD64 binary when running on older Linux versions, which is the situation when building on Netlify/Vercel etc. 7e9092e @bep #11414
There's no functional changes in this release. See v0.118.0.
v0.118.0
Note: Hugo 0.118.2 fixes an issue with the Linux binaries when building on Netlify/Vercel/etc.
Hugo 0.118.0
now builds with Go 1.21. This version also comes with:
- Proper CJK support in Markdown:
[markup.goldmark]
[markup.goldmark.extensions]
[markup.goldmark.extensions.cjk]
# Whether to enable CJK support.
enable = false
# Whether softline breaks between east asian wide characters should be ignored.
eastAsianLineBreaks = false
# Whether a '\' escaped half-space(0x20) should not be rendered.
escapedSpace = false
- A revamped implementation of
hugo new site
andhugo new theme
. See details.
Bug fixes
- Fix RegularPagesRecursive for the home page 15d3e48 @bep #11396
- Fix .RawContent for empty content pages (#11407) 3a8aad6 @bep #11406
- common/loggers: Fix typo in option name 65871d5 @alexandear
- Fix it so disable a module does not disable transitive dependency required by others dcf425c @bep #11376
Improvements
- Delay the creation of cache directories until they're used 94fbab2 @bep #11390
- deploy: Create AWS session for CloudFront invalidation via Go CDK c3f273b @mattbnz
- markup/goldmark: Add CJK extension d7dcc76 @henry0312 #10472
- testscripts: Move hugo new tests to where they belong d2ae9e1 @bep
- hugolib: Handle dropped error a7b93e6 @alrs
- Make sure resources directory isn't created in hugo new theme ebaa733 @bep #11382
- Go 1.21 Upgrade 24b1be4 @bep #11351
- testscripts: Make mod vendor test stable 111f02d @bep
- create/skeletons: Move theme's site config to top level 9a8c84d @jmooring #11380
- modules: Make new cache directories read/write cdf0b3b @jmooring #11369
- deploy: Update InvalidateCloudFront to use Go CDK helper d979831 @alexandear
- Avoid escaping HTML chars inside hugo_stats.json bcf7421 @bep #11371
- commands/new: Embed site and theme skeletons b653853 @jmooring #11358
- cache: Hide IsResourceDir from the exported config a2f6400 @bep
- commands: Handle floats without decimals in hugo config 7d74cd0 @bep #11345
- config: Add a type value for the tags related config entry b1b6912 @bep
- Try to make test more stable 641390f @bep
Dependency Updates
- build(deps): bump google.golang.org/api from 0.134.0 to 0.138.0 9bf76fd @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.11.1 to 0.12.0 b2a02c3 @dependabot[bot]
- build(deps): bump gocloud.dev from 0.33.0 to 0.34.0 6821d6f @dependabot[bot]
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0 93c7ad1 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.5.5 to 1.5.6 a19d03b @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.18.17 to 0.19.2 db7bc49 @dependabot[bot]
Documentation
- docs: Regen docs helper e847a98 @bep
- Don't use the OS environment when creating config for docs 45c9bbc @bep
- dockerfile: Update Docker images 8a08f91 @michalbiesek
- docshelper: Improve template lookup order descriptions 90944aa @jmooring
Build Setup
v0.117.0
This is a release on the small side, but. especially the new Page.RenderShortcodes
method is so useful, especially for bigger sites, that we decided to get it out sooner rather than later. This method renders all the shortcodes in the content, preserving the surrounding markup (e.g. Markdown) as is. See the Hugo Documentation for more information.
Improvements
- Add Page.RenderShortcodes ade7ec8 @bep #7297
- testing: Write test caches to /tmp 16da1ad @bep #11327
- Add retry in resources.GetRemote for temporary HTTP errors a3d42a2 @bep #11312
Dependency Updates
- build(deps): bump golang.org/x/net from 0.13.0 to 0.14.0 0de81c6 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.10.0 to 0.11.0 d4a6c16 @dependabot[bot]
- deps: Sync go-i18n with upstream 2e6191b @bep #11336
- build(deps): bump gocloud.dev from 0.24.0 to 0.33.0 2c20fd5 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.11.0 to 0.13.0 243736e @dependabot[bot]
- build(deps): bump github.com/marekm4/color-extractor from 1.2.0 to 1.2.1 bf891c2 @dependabot[bot]
- build(deps): bump github.com/frankban/quicktest from 1.14.5 to 1.14.6 da0df0a @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.9.0 to 0.10.0 0885f8e @dependabot[bot]
- build(deps): bump github.com/clbanning/mxj/v2 from 2.5.7 to 2.7.0 61be050 @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.9.3 to 0.11.1 65af75f @dependabot[bot]
- build(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3 2d75f74 @dependabot[bot]
- build(deps): bump github.com/hairyhenderson/go-codeowners 2ac3d61 @dependabot[bot]
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9 9dce45c @dependabot[bot]
Documentation
v0.116.1
v0.116.0
There are two notable changes in this release. For one, we have changed the default location of the cacheDir
(where Hugo stores all its file caches). Having the cache stored in a /tmp
folder has had its issues, especially for the module cache and especially on MacOS. The current new default should be better and more stable. See See Configure CacheDir for more info.
Also in this release: The where
template func finally supports regular expressions with the new like operator.
Note
- Deprecate taxonomyTerm bec9b80 @bep #11256
- Warn about unknown kinds in disableKinds 1c97095 @bep #11256
- The default value for
cacheDir
is changed to be stored below the directory as defined by Go's os.UserCacheDir. See Configure CacheDir
Bug fixes
- resources: Fix spelling in method name be8e2de @bep
- Fix so temporary images do not get published fbb8eb3 @bep #10255
- readme: Fix link 87d9bff @tfsojon
- tpl/collections: Fix description of apply function dc2a544 @jmooring
- Fix multiple languages in HUGO_DISABLELANGUAGES 7f058b8 @bep #11278
Improvements
- config: Do not fail on unknown config keys c1df5b1 @bep
- commands: Update cacheDir description d9fdcbe @jmooring
- Update where.md 295d733 @bep
- Deprecate taxonomyTerm bec9b80 @bep #11256
- Warn about unknown kinds in disableKinds 1c97095 @bep #11256
- Move all Kind constants to its own package b3cb678 @bep #11256
- Remove unused autogenerated method 36b5126 @bep
- tpl/collections: Add BenchmarkWhereOps ef6e813 @bep
- tpl/collections: Add like operator to where function f4598a0 @jmooring #11279
- Use os.UserCacheDir as first fallback if cacheDir is not set b3f1055 @bep #11286 #11291
- Add a common regexp cache 4d7af75 @bep
- commands: Replace deprecated ioutil with os 2589b12 @alexandear
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.18.11 to 0.18.17 d7db096 @dependabot[bot]
- build(deps): bump github.com/rogpeppe/go-internal 5542f02 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.8.0 to 0.9.0 0bc7ed9 @dependabot[bot]
- deps: Upgrade github.com/yuin/goldmark v1.5.4 => v1.5.5 739d10e @jmooring
Documentation
- docs: Regenerate CLI docs d297c8e @bep
- docs: Update where d524778 @bep
- docs: Update where function operators 036e260 @jmooring
- docs: Rework the cacheDir documentation a50356b @bep
Build Setup
v0.115.4
Bug fixes
- Fix broken handling of legacy taxonomyTerm in disableKinds d70b6c7 @bep #11257
- Fix cache busting setup 6bbec90 @bep #11268
- common/htime: Fix localization of abbreviated month names 2f11e67 @jmooring #11267
- Fix setting config from env with complex (e.g. YAML) strings c406fd3 @bep #11249
- Fix for data mounts in sub folders 286821e @dvdksn
Improvements
- commands: Move testscript into its correct place d947db3 @bep
- publisher: Improve class collector for dynamic classes d8c94c3 @bep
- commands: Delay server builds after the watcher is set up 5bd22ba @bep #11264
- Create hugo_stats.json if it's mounted but does not exists 7ae62f4 @bep #11264
- Re-instate disableLiveReload as a config option (and not just a flag) f1a061e @bep #11259
- Improve error messages for PostCSS etc. 387c5f6 @bep #9730