Skip to content

@bep bep released this May 18, 2019 · 55 commits to master since this release

This is a bug-fix release with one important fix. There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This release fixes that by protecting the Build method with a lock when running in server mode. 95ce2a40 @bep #5885#5968

Assets 30

@bep bep released this May 2, 2019 · 60 commits to master since this release

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

Hugo now has:

Enhancements

Templates

Other

Fixes

Templates

Output

  • Fix permalink in sitemap etc. when multiple permalinkable output formats 6b76841b @bep #5910

Core

Other

Assets 30

@bep bep released this Apr 25, 2019 · 75 commits to master since this release

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

Hugo now has:

Enhancements

Core

Other

Fixes

Core

Assets 30

@bep bep released this Apr 20, 2019 · 85 commits to master since this release

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

Hugo now has:

Enhancements

Templates

Core

Other

Fixes

Output

Assets 30

@bep bep released this Apr 17, 2019 · 101 commits to master since this release

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

Hugo now has:

Enhancements

Templates

Core

Fixes

Core

Other

Assets 30

@bep bep released this Apr 12, 2019 · 115 commits to master since this release

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

Hugo now has:

Notes

Enhancements

Core

Other

Fixes

Core

Other

Assets 30

@bep bep released this Apr 8, 2019 · 129 commits to master since this release

Hugo 0.55 is the early Easter Egg Edition with lots of great improvements and fixes. The original motivation for this release was to prepare for Issue #5074, but the structural changes needed for that paved the way for lots of others. Please study the list of changes below, and especially the Notes section, but some headlines include:

Virtualized Output Formats

Custom Output Formats has been a really useful feature, but it has had some annoying and not so obvious restrictions that are now lifted. Now all Page collections are aware of the output format being rendered. This means, to give some examples, that:

  • In a RSS template, listing pages with their content will use output format specific shortcode templates even if the pages themselves are not configured to output to that output format.
  • Using .Render when looping over a Page collection will now work as expected.
  • Every Output Format can be paginated.

We have now also added a new Permalinkable configuration attribute, which is enabled by default for HTML and AMP.

Shortcodes Revised

Shortcodes using the {{% as the outer-most delimiter will now be fully rendered when sent to the content renderer (e.g. Blackfriday for Markdown), meaning they can be part of the generated table of contents, footnotes, etc.

If you want the old behavior, you can put the following line in the start of your shortcode template:

{{ $_hugo_config := `{ "version": 1 }` }}

But using the {{< delimiter will, in most cases, be a better alternative, possibly in combination with the markdownify template func.

See #5763.

New Return Keyword for Partials

Hugo's partial and partialCached are great for template macros. With the new return keyword you can write partials as proper functions that can return any type:

{{ $v := add . 42 }}
{{ return $v }}

See #5783.

.Page on Taxonomy nodes

The taxonomy nodes now have a .Page accessor which makes it much simpler to get a proper .Title etc. This means that older and clumsy constructs can be simplified. Some examples:

<ul>
    {{ range .Data.Terms.Alphabetical }}
            <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
    {{ end }}
</ul>
<ul>
    {{ range .Site.Taxonomies.tags }}
            <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
    {{ end }}
</ul>

See #5719.

And it's Faster!

This version is also the fastest to date. A site building benchmark shows more than 10% decrease in both build time and memory consumption, but that depends on the site. It’s quite a challenge to consistently add significant new functionality and simultaneously improve performance. Also, note that we are now more honest about build times reported (Total in 1234 ms). We now do all initialization in the Build step, so you may get a higher time reported if you, as an example, have --enableGitInfo enabled, which now is included in the reported time.

Benchmark

Thanks!

This release represents 59 contributions by 10 contributors to the main Hugo code base.
@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @mcdee, @quasilyte, and @danielcompton for their ongoing contributions.
And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 36 contributions by 21 contributors. A special thanks to @bep, @peaceiris, @budparr, and @tinymachine for their work on the documentation site.

As this release has required a significant effort with manual testing, a special thanks go to @onedrawingperday (the 300 theme demo sites have been invaluable to check for API-breakage!), @adiabatic, and @divinerites.

Hugo now has:

Notes

  • {{ % as the outer-most shortcode delimiter means "pass the inner content to the content renderer" (e.g. Blackfriday); the old behavior can be had, see #5763
  • preserveTaxonomyNamesconfiguration option is removed. Use .Page.Title.
  • We no longer limit the number of pages passed to the RSS Output Format. We have moved that limit to the internal RSS template, and you can do so yourself using the Config.Services.RSS.Limit in your custom template.
  • We no longer add XML headers to Output Formats that output XML (<?xml version="1.0" encoding="utf-8" standalone="yes" ?>). This header is moved to the templates. If you have custom RSS or sitemap templates you may want to add the XML declaration to these. Since they, by default, is handled by Go's HTML template package, you must do something like this to make sure it's preserved: {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
  • More honest build times reported (Total in 1234 ms). We now do all initialization in the Build step, so you may get a higher time reported if you, as an example, have --enableGitInfo enabled, which now is included in the reported time.
  • The taxonomy nodes now have a .Page accessor which makes it much simpler to get a proper .Title etc. see #5719.
  • The template keywords with and if now work properly for zero and interface types, see #5739
  • Taxonomy terms lists (Page of Kind taxonomyTerm) without any date(s) set (e.g. from front matter) will now pick the latest dates from the child pages. This is in line with how other branch nodes work in Hugo.
  • A new configuration option, Permalinkable, is added to Output Format and enabled that by default for HTML and AMP types. See #5706
  • --stepAnalysis is removed. If you want to really understand the latency in your project in Hugo, try the new --trace flag and pass that file to the many tools that read Go Trace files. There are also some newly hidden flags in --profile-cpu, --profile-men, --profile-mutex, hidden because they are considered to be only of interest to developers.
  • Chroma is updated with many fixes and new lexers, see #5797
  • We now support Page-relative aliases, e.g. aliases that do not start with a /, see #5757
  • We now support context-relative (language) URLs in front matter, meaning that in most cases url: /en/mypage can be replaced with the more portable url: mypage. See #5704

Enhancements

Templates

Output

Core

Other

Fixes

Templates

Core

Other

Assets 30

@bep bep released this Feb 1, 2019 · 197 commits to master since this release

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 @tryzniak, @anthonyfok, and @mywaiting for their ongoing contributions. And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 38 contributions by 17 contributors. A special thanks to @bep, @kaushalmodi, @onedrawingperday, and @peaceiris for their work on the documentation site.

Hugo now has:

Enhancements

Templates

Core

Other

Fixes

Templates

Other

Assets 30

@bep bep released this Dec 24, 2018 · 240 commits to master since this release

From all of us to all of you, a very Merry Christmas -- and Hugo 0.53!

The main new features in this release are:

  • You can now split your configuration into directories per environment. Hugo did support multiple configuration files before this release, but it was hard to manage for bigger sites, especially those with multiple languages. With this we have also formalized the concept of an environment; the defaults are production (when running hugo) or development (when running hugo server) but you can create any environment you like. We will update the documentation, but all the details are in this issue. Also, see this PR for how the refactored configuration for the Hugo website looks like.
  • transform.Unmarshal (see the documentation is a new and powerful template function that can turn Resource objects or strings with JSON, TOML, YAML or CSV into maps/arrays.
  • Two new global variables in site and hugo. hugo gives you version info etc. ({{ hugo.Version }}, {{ hugo.Environment }}), but the site is probably more useful, as it allows you to access the current site's variables (e.g. {{ site.RegularPages }}) without any context (or ".").

This version is also the fastest to date. A site building benchmark shows around 10% faster, but that depends on the site. The important part here is that we're not getting slower. It’s quite a challenge to consistently add significant new functionality and simultaneously improve performance. It's like not gaining weight during Christmas. We also had a small performance boost in version 0.50. A user then reported that his big and complicated site had a 30% reduction in build time. This is important to us, one of the core features. It's in the slogan: "The world’s fastest framework for building websites."

This release represents 37 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 @moorereason, @coliff, and @jfyuen for their ongoing contributions. And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 19 contributions by 8 contributors. A special thanks to @bep, @kaushalmodi, @peaceiris, and @moorereason for their work on the documentation site.

Hugo now has:

Notes

  • The hugo benchmark command is removed
  • We now do not publish transformed inline resources, e.g. minified CSS only accessed via .Content., e.g. {{ ($css | minify).Content }}. Before this version, the minified CSS in that example would be copied to /public, which was never the intention. If you want that, you need to access either .RelPermalink or .Permalink.

Enhancements

Templates

Core

Other

Fixes

Templates

Other

Assets 30

@bep bep released this Nov 28, 2018 · 288 commits to master since this release

The two big new items in this release is Inline Shortcodes and Consolidated File Caches. In Hugo we really care about build speed, and caching is important. With this release, you get much better control over your cache configuration, which is especially useful when building on a Continous Integration server (Netlify, CircleCI or similar). Inline Shortcodes was implemented to help the Bootstrap project move their documentation site to Hugo. Note that this feature is disabled by default. To enable, set enableInlineShortcodes = true in your site config. Worth mentioning is also the new param shortcode, which looks up the param in page front matter with the site's parameter as a fall back.

This release represents 33 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 @moorereason, @emirb, and @allizad for their ongoing contributions.
And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 4 contributors. A special thanks to @budparr, @bep, @allizad, and @funkydan2 for their work on the documentation site.

Hugo now has:

Enhancements

Templates

Core

Other

Fixes

Templates

Other

Assets 30
You can’t perform that action at this time.