Skip to content

Releases: gohugoio/hugo

v0.45.1

25 Jul 09:26
@bep bep
Compare
Choose a tag to compare

This is a bug-fix release with a couple of important fixes (and one enhancement).

Enhancements

Fixes


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

v0.45

22 Jul 12:26
@bep bep
Compare
Choose a tag to compare

Hugo 0.45 is the revival of ref, relref and GetPage. @vassudanagunta and @bep have done some great work improving the API and implementation for the helper functions used to get one page. Before this release, the API was a little bit clumsy and the result potentially ambiguous in some situations.

Now you can simply do:

{{ with .Site.GetPage "/blog/my-post.md" }}{{ .Title }}{{ end }}

Or to get a section page:

{{ with .Site.GetPage "/blog" }}{{ .Title }}{{ end }}

We have also added a .GetPage method on Page and added support for page-relative linking. This means that the leading slash (/) now has a meaning. For .Site.GetPage, all lookups will start at the content root. But for lookups with a Page context, paths without a leading slash will be treated as relative to the page.

This means that the following example will find the page in the current section:

{{< ref "my-post.md" >}}

You can also use the .. to refer to a page one level up etc.:

{{< ref "../my-post.md" >}}

We have now also added language support to ref and relref, so you can link to a page in another language:

{{< relref path="document.md" lang="jp" >}}

To link to a given Output Format of a document, you can use this syntax:

{{< relref path="document.md" outputFormat="rss" >}}

To make working with these reflinks on bigger sites easier to work with, we have also improved the error logging, and added two new configuration settings:

  • refLinksErrorLevel: ERROR (default, will fail the build when a reflink cannot be resolved) or WARNING.
  • refLinksNotFoundURL: Set this to an URL placeholder used when no reference could be resolved.

Visit the Hugo Docs for more information.

We have also done some important improvements and fixes in Hugo Pipes in this release: SCSS source maps on Windows now works, we now support project-local PostCSS installation, and we have added IncludePaths to SCSS options, making it possible to include, say, a path below node_modules in the SASS/SCSS build.

This release represents 31 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 @vassudanagunta, @hairmare, and @garrmcnu 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 10 contributions by 8 contributors. A special thanks to @kaushalmodi, @Hanzei, @KurtTrowbridge, and @regisphilibert for their work on the documentation site.

Hugo now has:

Notes

  • .Site.GetPage with more than 2 arguments will not work anymore. This means that {{ .Site.GetPage "page" "blog" "my-post.md" }} will fail. {{ .Site.GetPage "page" "blog/my-post.md" }} will work, but we recommend you use the simpler {{ .Site.GetPage "/blog/my-post.md" }}
  • Relative paths in relref or ref that finds its match not relative to the page itself will work, but we now print a warning saying that you should correct it to an absolute path. E.g. {{</* ref "blog/my-post.md" */>}} => {{</* ref "/blog/my-post.md" */>}}.

Enhancements

Fixes


Automated with GoReleaser
Built with go version go1.10.1...

Read more

v0.44

13 Jul 06:41
@bep bep
Compare
Choose a tag to compare

Hugo 0.44 is the follow-up release, or The Sequel, of the very well received 0.43 only days ago. That release added Hugo Pipes, with SCSS/SASS support, assets bundling and minification, ad-hoc image processing and much more.

This is mostly a bug-fix release, but it also includes several important improvements.

Many complained that their SVG images vanished when browsed from the hugo server. With Hugo Pipes MIME types suddenly got really important, but Hugo's use of Suffix was ambiguous. This became visible when we redefined the image/svg+xml to work with Hugo Pipes. We have now added a Suffixes field on the MIME type definition in Hugo, which is a list of one or more filename suffixes the MIME type is identified with. If you need to add a custom MIME type definition, this means that you also need to specify the full MIME type as the key, e.g. image/svg+xml.

Hugo now has:

Notes

  • MediaType.Suffix is deprecated and replaced with a plural version, MediaType.Suffixes, with a more specific definition. You will get a detailed WARNING in the console if you need to do anything.

Enhancements

Fixes


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

v0.43

09 Jul 10:50
@bep bep
Compare
Choose a tag to compare

Windows users, see #4919

Hugo 0.43 adds a powerful and very simple to use Assets Pipeline with SASS and SCSS with source map support, PostCSS and minification and fingerprinting and Subresource Integrity and ... much more. Oh, did we mention that you can now do ad-hoc image processing and execute text resources as Go templates?

An example pipeline:

{{ $styles := resources.Get "scss/main.scss" | toCSS | postCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">

To me, the above is beautiful in its speed and simplicity. It could be printed on a t-shirt. I wrote in the Hugo Birthday Post some days ago about the value of a single binary with native and fast implementations. I should have added simplicity as a keyword. There seem to be a misconception that all of this needs to be hard and painful.

New functions to create Resource objects:

  • resources.Get
  • resources.FromString: Create a Resource from a string.

New Resource transformation funcs:

  • resources.ToCSS: Compile SCSS or SASS into CSS.
  • resources.PostCSS: Process your CSS with PostCSS. Config file support (project or theme or passed as an option).
  • resources.Minify: Currently supports css, js, json, html, svg, xml.
  • resources.Fingerprint: Creates a fingerprinted version of the given Resource with Subresource Integrity.
  • resources.Concat: Concatenates a list of Resource objects. Think of this as a poor man's bundler.
  • resources.ExecuteAsTemplate: Parses and executes the given Resource and data context (e.g. .Site) as a Go template.

I, @bep, implemented this in dea71670. We will work hard to get the documentation up to date, but follow the links above for details, and also see this demo project.

This release represents 35 contributions by 7 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, @openscript, and @caarlos0 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 11 contributions by 5 contributors. A special thanks to @bep, @danrl, @regisphilibert, and @digitalcraftsman for their work on the documentation site.

Hugo now has:

Notes

  • Replace deprecated {Get,}ByPrefix with {Get,}Match 42ed6025 @anthonyfok
  • Hugo is now released with two binary version: One with and one without SCSS/SASS support. At the time of writing, this is only available in the binaries on the GitHub release page. Brew, Snap builds etc. will come. But note that you only need the extended version if you want to edit SCSS. For your CI server, or if you don't use SCSS, you will most likely want the non-extended version.

Enhancements

Templates

Core

Other

Fixes

v0.42.2

28 Jun 12:39
@bep bep
Compare
Choose a tag to compare

This release fixe broken server-reload on config changes. This is a regression from Hugo 0.42. 3a7706b0 @bep #4878


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

v0.42.1

13 Jun 10:21
@bep bep
Compare
Choose a tag to compare

This is a bug-fix release with two fixes:


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

v0.42

12 Jun 06:43
@bep bep
Compare
Choose a tag to compare

Hugo 0.42 adds Theme Components. This is a really powerful new way of building your Hugo sites with reusable components. This is both Theme Composition and Theme Inheritance.

Read more about Theme Components in the Hugo Documentation.

The feature above was implemented by @bep, the funny Norwegian, with great design help from the Hugo community. But that implementation would not have been possible without Afero, Steve Francia's virtual file system. Hugo is built on top of Afero and many other fast and solid Go projects, and if you look at the combined contribution log of the Hugo project and its many open source dependencies, the total amount of contributions is staggering. A big thank you to them all!

This release represents 27 contributions by 7 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @onedrawingperday, @anthonyfok, and @stefanneuhaus 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 8 contributions by 5 contributors. A special thanks to @bep, @LorenzCK, @gavinwray, and @deyton for their work on the documentation site.

Hugo now has:

Notes

  • The speakerdeck shortcode is removed. It didn't work properly, so is isn't expected to be in wide use. If you use it, you will get a build error. You will either have to remove its usage or add a speakerdeck shortcode to your own project or theme.
  • We have now virtualized the filesystems for project and theme files. This makes everything simpler, faster and more powerful. But it also means that template lookups on the form {{ template “theme/partials/pagination.html” . }} will not work anymore. That syntax has never been documented, so it's not expected to be in wide use. {{ partial "pagination.html" . }} will give you the most specific version of that partial.

Enhancements

Fixes


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

v0.41

25 May 17:04
@bep bep
Compare
Choose a tag to compare

In Hugo 0.41 we add a new Privacy Configuration section to meet the new regulations in the new General Data Protection Regulation (GDPR). Many have contributed work on this project, but a special thanks to @onedrawingperday, @jhabdas, and @it-gro.

You can read more about the new Privacy Config here.

Hugo now has:

Notes

  • We have fixed an issue where we sent the wrong .Site object into the archetype templates used in hugo new. This meant that if you wanted to access site params and some other fields you needed to use .Site.Info.Params etc. This release fixes that so now you can use the same construct in the archetype templates as in the regular templates.

Enhancements

Fixes


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

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