v0.44

@bep bep released this Jul 13, 2018 · 38 commits to master since this release

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

@bep bep released this Jul 9, 2018 · 57 commits to master since this release

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

@bep bep released this Jun 12, 2018 · 115 commits to master since this release

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

@bep bep released this May 25, 2018 · 150 commits to master since this release

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

@bep bep released this Apr 23, 2018 · 219 commits to master since this release

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