Skip to content

Releases: gohugoio/hugo

v0.40.3

09 May 07:54
@bep bep
Compare
Choose a tag to compare

Hugo 0.40.3 fixes a possible .Content truncation issue introduced in 0.40.1 90d0d830 @bep #4706. This should be very rare. It has been reported by only one user on a synthetic site. We have tested a number of big sites that does not show this problem with 0.40.2, but this is serious enough to warrant a patch release.


Automated with GoReleaser
Built with go version go1.10.1 linux/amd64

v0.40.2

30 Apr 06:51
@bep bep
Compare
Choose a tag to compare

This release fixes some regressions introduced in Hugo 0.40. See the milestone for an issue list.


Automated with GoReleaser
Built with go version go1.10.1 linux/amd64

v0.40.1

25 Apr 13:24
@bep bep
Compare
Choose a tag to compare

This release fixes some shortcode vs .Content corner cases introduced in Hugo 0.40 288c3964 @bep #4632#4664.


Automated with GoReleaser
Built with go version go1.10.1 linux/amd64

v0.40

23 Apr 07:52
@bep bep
Compare
Choose a tag to compare

Hugo 0.40 is The Revival of the Shortcodes. Shortcodes is one of the prime features in Hugo. Really useful, but it has had some known shortcomings. @bep has been really busy the last week to address those.

In summary:

  • .Content for a page retrieved in a query in a shortcode is now almost always available. Note that shortcodes can include content that can include shortcodes that can include content... It is possible to bite your tail. See more below.
  • Shortcodes are now processed and rendered in their order of appearance.
  • Related to the above, we have now added a zero-based .Ordinal to the shortcode.

The first bullet above resolves some surprising behaviour when reading other pages' content from shortcodes. Before this release, that behaviour was undefined. Note that this has never been an issue from regular templates.

It will still not be possible to get the current shortcode's page's rendered content. That would have impressed Einstein.

The new and well defined rules are:

  • .Page.Content from a shortcode will be empty. The related .Page.Truncated .Page.Summary, .Page.WordCount, .Page.ReadingTime, .Page.Plain and .Page.PlainWords will also have empty values.
  • For other pages (retrieved via .Page.Site.GetPage, .Site.Pages etc.) the .Content is there to use as you please as long as you don't have infinite content recursion in your shortcode/content setup. See below.
  • .Page.TableOfContents is good to go (but does not support shortcodes in headlines; this is unchanged)

If you get into a situation of infinite recursion, the .Content will be empty. Run hugo -v for more information.

This release represents 19 contributions by 3 contributors to the main Hugo code base.

Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 13 contributions by 6 contributors. A special thanks to @kaushalmodi, @anthonyfok, @bep, and @regisphilibert for their work on the documentation site.

Hugo now has:

Notes

  • We have added a timeout configuration setting. This is currently only used to time out the .Content creation, to bail out of recursive recursions. Run hugo -v to see potential warnings about this. The timeout is set default to 10000 (10 seconds).

Enhancements

Templates

Other


Automated with GoReleaser
Built with go version go1.10.1 linux/amd64

v0.39

16 Apr 07:36
@bep bep
Compare
Choose a tag to compare

Nat King Cole was a fantastic American jazz pianist. When his bass player had visited the bar a little too often, he started with his percussive piano playing to keep the tempo flowing. Oscar Peterson called it "Nat's stabilizers". This release is the software equivalent of that. We have been doing frequent main releases this year, but looking back, the patch releases that followed them seemed unneeded. And looking at the regressions, most of them stem from the commands package, a package that before this release was filled with globals and high coupling. This package is now rewritten and accompanied with decent test coverage.

But this release isn't all boring and technical: It includes several important bug fixes, several useful new template functions, and Resource.Content allows you to get any resource's content without having to fiddle with file paths and readFile.

This release represents 61 contributions by 4 contributors to the main Hugo code base. A shout-out to @bep for the implementation and @it-gro and @RickCogley for the help testing it.

@bep leads the Hugo development with a significant amount of contributions and his witty Norwegian humour, but also a big shoutout to @anthonyfok, @thedodobird2, and @neurocline for their ongoing contributions.
And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.

Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 6 contributions by 5 contributors. A special thanks to @kaushalmodi, @regisphilibert, @bep, and @tomanistor for their work on the documentation site.

Hugo now has:

Notes

  • The main.Execute function now returns a Response object and the global Hugo variable is removed. This is only relevant for people building some kind of API around Hugo.
  • Remove deprecated File.Bytes 94c8b29c @bep

Enhancements

Templates

Other

Fixes

Read more

v0.38.2

09 Apr 08:26
@bep bep
Compare
Choose a tag to compare

This is a bug-fix release with a couple of important fixes:

Also in this release:


Automated with GoReleaser
Built with go version go1.10 linux/amd64

v0.38.1

05 Apr 16:40
@bep bep
Compare
Choose a tag to compare

This is a bug-fix that is mainly motivated by some issues with server live reloading introduced in Hugo 0.38.

This release also contains some improvements:


Automated with GoReleaser
Built with go version go1.10 linux/amd64

v0.38

02 Apr 11:07
@bep bep
Compare
Choose a tag to compare

Hugo 0.38 is an Easter egg filled with good stuff. We now support fetching date and slug from the content filename, making the move from Jekyll even easier. And you can now set contentDir per language with intelligent merging, and themes can now provide configuration ... Also worth mentioning is several improvements in the Chroma highlighter, most notable support for Go templates.

We are working hard to get the documentation up-to-date with the new features, but you can also see them in action with the full source at hugotest.bep.is.

This release represents 39 contributions by 4 contributors to the main Hugo code base.
@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @anthonyfok, @felicianotech, and @paulcmal for their ongoing contributions.

And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.

Also, a shoutout to @regisphilibert for his work on the new Code Toggle Shortcode on the Hugo docs site, which we will put to good use to improve all the configuration samples.

Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 55 contributions by 18 contributors. A special thanks to @kaushalmodi, @bep, @xa0082249956, and @paulcmal for their work on the documentation site.

Hugo now has:

Notes

  • Hugo now allows partial redefinition outputs in your site configuration. This is what most people would expect, but it is still a change in behaviour. For details, see #4487
  • Before this release, Hugo flattened URLs of processed images in sub-folders. This worked fine but was not intentional. See #4502.

Enhancements

Fixes


Automated with GoReleaser
Built with go version go1.10 linux/amd64

v0.37.1

07 Mar 18:00
@bep bep
Compare
Choose a tag to compare

This is a bug-fix release with a one important fix:

Image content such as SVG cannot be scaled with the built-in image processing methods, but it should still be possible to use them as page resources. This was a regression in Hugo 0.37 and is now fixed. ba94abbf @bep #4455


Automated with GoReleaser
Built with go version go1.10 linux/amd64

v0.37

27 Feb 09:20
@bep bep
Compare
Choose a tag to compare

The main item in Hugo 0.37 is that we now properly preserve the colour palette when processing PNG images. We got reports from users experiencing their PNG images getting bigger in file size when scaled down. Now, if you, as an example, start out with a carefully chosen 8 bit colour palette (i.e. PNG-8), this is now what you will end up with. A special thanks to @aitva for doing the investigative work finding a proper fix for this issue.

This release represents 40 contributions by 5 contributors to the main Hugo code base.

@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @vassudanagunta, @kaushalmodi, and @curttimson for their ongoing contributions.

And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.

Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 24 contributions by 8 contributors. A special thanks to @bep, @4RU, @kaushalmodi, and @mitchchn for their work on the documentation site.

Hugo now has:

Notes

  • Hugo will now convert non-string YAML map keys to string. See #4393 for more information. You will get a WARNING in the console if you are touched by this.
  • We have improved the PNG processing, and have incremented the version numbers on the URL for the processed PNG image. This will just work, but you may want to run hugo --gc to clean up some old stale images in the resource cache.

Enhancements

Templates

  • Add template func for TOML/JSON/YAML docs examples conversion. This is mainly motivated by the needs of the Hugo docs site. d382502d @bep #4389

Core

Other

Fixes

Core

Other


Automated with GoReleaser
Built with go version go1.10 linux/amd64