Skip to content

Releases: gohugoio/hugo

v0.134.3

19 Sep 14:54
@bep bep
Compare
Choose a tag to compare

v0.134.2

10 Sep 12:14
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.134.1

05 Sep 11:08
@bep bep
Compare
Choose a tag to compare

What's Changed

  • Fix stray end p tag in Obsidian callout titles 66a3a11 @bep #12828
  • Make ContentWithoutSummary return Content when summary is fetched from front matter 8f2eac0 @bep #12822

v0.134.0

03 Sep 10:19
@bep bep
Compare
Choose a tag to compare

Hugo v0.134.0 brings render hooks for tables, ContentWithoutSummary, scoped content render and Obsidian style callout alerts.

ContentWithoutSummary and scoped content render

This release finally brings a Page.ContentWithoutSummary method. This has been a long sought after method where the use case is obvious: render the summary with a more button that renders the ... content without summary. To enable this we have reimplemented the content summary handling in Hugo. This consolidates the 3 summary types (auto, manual and frontmatter) – they are now all HTML. This is a slightly breaking change (manual was plain text before), but the new behaviour should be much less confusing and easier to handle in the templates. If you want plain text, pipe it into plainify: {{ .Summary | plainify }}.

Before this release there was one instance of .Content for a given page, it was e.g. not possible to render a page's content slightly different (e.g. different heading levels) on the list pages or the home page. This release anables that with a new Page.Markup with an optional scope argument.

In the list template you would do something like this:

{{ range .Pages | first 5 }}
  {{ with .Markup "list" }}
     {{ with .Render }}
       <div>
           <li>{{ .Summary }}</li> 
           <li>{{ .ContentWithoutSummary }}</li> 
           <li>{{ .WordCount }}</li> 
           <li>etc ...</li> 
       </div>
     {{ end }}
  {{ end }}
{{ end }}

You can think of the custom scope list as a cache key: Multiple invocations on the same page with the same scope will give the same return value. You can now pass down some data or configuration to in .Page.Store to the templates that render this markup (shortcodes, render hooks), or you can use the new global hugo.Context.MarkupScope function made for this purpose:

{{ if eq hugo.Context.MarkupScope "list" }}
  {{/* Render some list markup. */}}
{{ else }}
  {{/* default */}}
{{ end }}

Render hooks for tables

This has been a long sought after feature. Now you can have full control over how you render your Markdown tables with table render hooks.

Obsidian style callout alerts

Hugo v0.133.0 added blockquote render hooks with GitHub styled alerts. We have since then gotten some feedback about extended alert syntax in Obsidian, and in Hugo v0.134.0 we now support both.

Bug fixes

Improvements

Dependency Updates

Documentation

v0.133.1

26 Aug 14:31
@bep bep
Compare
Choose a tag to compare

Bug fixes

v0.133.0

17 Aug 20:13
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.132.2

14 Aug 16:32
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.132.1

13 Aug 10:24
@bep bep
Compare
Choose a tag to compare

What's Changed

v0.132.0

12 Aug 15:39
@bep bep
Compare
Choose a tag to compare

Server-side math rendering using KaTeX with Markdown render hooks support, blockquote Markdown render hooks with GitHub style alerts syntax support, and more.

Bug fixes

Improvements

Dependency Updates

Documentation

Build Setup

v0.131.0

02 Aug 09:24
@bep bep
Compare
Choose a tag to compare

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

  • identity: Use xxHash in hashstructure (note) 2babd64 @bep

Bug fixes

Improvements

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