Skip to content

Releases: gohugoio/hugo

v0.108.0

06 Dec 13:58
@bep bep
Compare
Choose a tag to compare

With Hugo v0.108.0 you can render standalone Markdown images without a surrounding paragraph. Both the HTML- and CommonMark-specification defines image as an inline element. For Markdown, this has meant that if you put an image on its own (not inlined in another paragraph), it would be wrapped in <p></p> tags, even if you provide your own Render Hook Template.

Now you can get by this annoyance by setting markup.goldmark.parser.wrapStandAloneImageWithinParagraph = false

[markup]
  [markup.goldmark]
    [markup.goldmark.parser]
      wrapStandAloneImageWithinParagraph = false
      [markup.goldmark.parser.attribute]
        block = true

In the above we have also enabled attribute support for Markdown blocks to illustrate another nice side effect of this; it's now possible to use Markdown attributes (e.g. CSS classes) on standalone images:

This is an inline image: ![Inline Image](/inline.jpg). Some more text.

![Block Image](/block.jpg)
{.blue}

The images in the above Markdown example would, given the hook template below, be rendered wrapped in a figure element with the blue CSS class applied in the latter example.

{{ if .IsBlock }}<figure class="{{ .Attributes.class }}"><img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" /></figure>
{{ else }}<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />{{ end }}

Two new fields are added to the render context passed to image render hooks:

Bug fixes

  • common/hugio: Fix multiWriteCloser.Close 5067775 @bep #10505
  • tpl/collections: Fix some index cases where the indices given is a slice and be more lenient with nil inputs d373774 @bep #10489

Improvements

Dependency Updates

  • deps: Upgrade github.com/bep/godartsass v0.15.0 => v0.16.0 f5b5b71 @bep
  • build(deps): bump github.com/getkin/kin-openapi from 0.109.0 to 0.110.0 50549c8 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.16 to 0.15.18 535ea8c @dependabot[bot]
  • build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 8bbec42 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.15 to 0.15.16 0bfa293 @dependabot[bot]
  • deps: Upgrade github.com/bep/godartsass v0.14.0 => v0.15.0 83080df @bep

Documentation

v0.107.0

24 Nov 14:15
@bep bep
Compare
Choose a tag to compare

This release is mostly interesting if you do code highlighting. We fixed a bottle neck which should show a significant performance boost for sites using code highlighting. Hugo's gohugo.io docs site builds ~20% faster. Also, Chroma, the highlighting library, is upgraded to v2.4.0 with new lexers and lots of improvements.

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump github.com/getkin/kin-openapi from 0.108.0 to 0.109.0 6a004b8 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.14 to 0.15.15 0923622 @dependabot[bot]
  • build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.4 7477672 @dependabot[bot]
  • build(deps): bump golang.org/x/tools from 0.2.0 to 0.3.0 63f7f0f @dependabot[bot]
  • deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.0 bcb62d8 @bep

v0.106.0

17 Nov 18:52
@bep bep
Compare
Choose a tag to compare

Bug fixes

Dependency Updates

  • build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.4 to 2.0.6 bafb389 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.13 to 0.15.14 cdd83bf @dependabot[bot]
  • deps: Update the libweb version string e00220a @bep
  • deps: Upgrade github.com/bep/gowebp v0.1.0 => v0.2.0 a662dda @bep
  • build(deps): bump github.com/yuin/goldmark from 1.5.2 to 1.5.3 fe08d35 @dependabot[bot]
  • build(deps): bump github.com/spf13/afero from 1.9.2 to 1.9.3 4b675dd @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.108.0 24eaa29 @dependabot[bot]
  • build(deps): bump github.com/clbanning/mxj/v2 from 2.5.6 to 2.5.7 58a98c7 @dependabot[bot]
  • build(deps): bump golang.org/x/net from 0.1.0 to 0.2.0 900904f @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.12 to 0.15.13 24eca0c @dependabot[bot]

Documentation

v0.105.0

28 Oct 12:51
@bep bep
Compare
Choose a tag to compare

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump golang.org/x/tools from 0.1.12 to 0.2.0 f505854 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.106.0 to 0.107.0 2aedccc @dependabot[bot]
  • build(deps): bump golang.org/x/text from 0.3.7 to 0.4.0 c109314 @dependabot[bot]
  • build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.1 4732c47 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.103.0 to 0.106.0 62780ec @dependabot[bot]
  • build(deps): bump github.com/tdewolff/minify/v2 from 2.12.1 to 2.12.4 351d6b0 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.4.15 to 1.5.2 ed930db @dependabot[bot]
  • build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0 05df964 @dependabot[bot]
  • build(deps): bump github.com/magefile/mage from 1.13.0 to 1.14.0 9860e0e @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.9 to 0.15.12 2ef60db @dependabot[bot]

Documentation

Build Setup

v0.104.3

04 Oct 14:45
@bep bep
Compare
Choose a tag to compare

What's Changed

Note that none of the fixes below are regressions from v0.104.*; the first one, the GIF fix, comes from v0.101, back when we added support for processing animated GIFs.

v0.104.2

29 Sep 10:56
@bep bep
Compare
Choose a tag to compare

Fix htimes /: operation not permitted error on config changes when running the server. This regression was introduced in Hugo v0.104.1 4611b69 @bep

v0.104.1

26 Sep 17:20
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.104.0

23 Sep 14:55
@bep bep
Compare
Choose a tag to compare

Some bug fixes, dependency upgrades and a new $image.Colors method. This method returns a slice of the most dominant colors in an image. The library we use is implemented by @marekm4 and is both fast and accurate. One use case for this may be to use as a placeholder before the image is loaded, as seen on this Hugo gallery [theme source]. You need a slow enough internet connection to notice this effect so you may want to try this with Chrome's dev console open and throttle the network to slow 3G, which would make it look something like this:

colorsani1.mp4

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump github.com/evanw/esbuild from 0.15.8 to 0.15.9 edf9038 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.4.14 to 1.4.15 78f49b4 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.100.0 to 0.103.0 fa4b77e @dependabot[bot]
  • build(deps): bump github.com/alecthomas/chroma/v2 from 2.2.0 to 2.3.0 4d909d4 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.7 to 0.15.8 4eb6d97 @dependabot[bot]

Documentation

v0.103.1

18 Sep 14:48
@bep bep
Compare
Choose a tag to compare

What's Changed

  • server: Fix redirects when file path contains bytes > 0x80 or whitespace 6be6752 @bep #10287

v0.103.0

15 Sep 16:46
@bep bep
Compare
Choose a tag to compare

There are 3 main topics in this release:

  • The hugo server finally comes with proper 404 support.
  • You can now use PostProcess'ed resources in all file types (e.g. JSON), not just HTML.
  • We have standardised the archive names for the release archives (as you can see further below). Hugo has since the first version used a rather odd and non-standard mixed case naming of the archive files (e.g. hugo_0.102.3_OpenBSD-64bit.tar.gz). We now use the standard GOOS/GOARCH values as-is, which makes it easier for people to script against. To avoid breakage when running on Netlify and similar, we create aliases for the most commonly downloaded Linux-archives on the old format and will continue to do so in the foreseeable future.

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0 1fd4c56 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.98.0 to 0.100.0 5e2b28d @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.15.5 to 0.15.7 f2019f0 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.4.13 to 1.4.14 475638f @dependabot[bot]

Build Setup