The world’s fastest framework for building websites.
The only change in this release is that the release binaries are compiled with Go 1.21.4 which comes with a security fix for Windows that may be relevant for Hugo. See:
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:
{{ $timer := debug.Timer "slowTemplate" }}
// ...
{{ $timer.Stop }}
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.
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 #11598site.DisqusShortname is deprecated
2eca1b3ccsite.GoogleAnalytics
is deprecated a692278bcsite.Author
is deprecated d4016dd5csite.Social
is deprecated 4910312eeAlso, we have changed the string type for some of the fields and methods:
template.HTML
$resource.Data.Integrity
now returns a string
and not a template.HTMLAttr
delimit
now returns a string
and not a template.HTML
See #10876 #11502.string
, see #11536Pager
now returns a string
.site.BaseURL
now returns a string
.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.:
{{ $s := slice "<i>foo</i>" }}
{{ delimit $s "," }}
Then you need to mark the type with safeHTML
:
{{ $s := slice "<i>foo</i>" }}
{{ delimit $s "," | safeHTML }}
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:
{{ $watermark := resources.Get "logo.jpg" | images.Filter
(images.GaussianBlur 6)
(images.Opacity 0.5)
}}
{{ $watermark = $watermark.Resize (printf "%dx%d png" $watermark.Width $watermark.Height )
There are some issues with the above:
With Hugo 0.119.0 the above can be written as:
{{ $watermark := resources.Get "logo.jpg" | images.Filter
(images.GaussianBlur 6)
(images.Opacity 0.5)
(images.Process "png")
}}
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. 7e9092eee @bep #11414
There's no functional changes in this release. See 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:
[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
hugo new site
and hugo new theme
. See details.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.