hugo/docs/content/en/news/0.69.0-relnotes/index.md
2020-04-10 09:08:37 +00:00

6.6 KiB


date: 2020-04-10 title: "0.69.0" description: "0.69.0" categories: ["Releases"]

It's Eeaster, a time for mysteries and puzzles. And at first glance, this Hugo release looks a little mysterious. The core of if is a mind-twister:
{{ $css := resources.Get "css/main.css" }}
{{ $css = $css | resources.PostCSS }}
{{ if hugo.IsProduction }}
{{ $css = $css | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link href="{{ $css.RelPermalink }}" rel="stylesheet" />

The above uses the new resources.PostProcess template function which tells Hugo to postpone the transformation of the Hugo Pipes chain to after the build, allowing the build steps to use the build output in /public as part of its processing.

The prime current use case for the above is CSS pruning in PostCSS. In simple cases you can use the templates as a base for the content filters, but that has its limitations and can be very hard to setup, especially in themed configurations. So we have added a new writeStats configuration that, when enabled, will write a file named hugo_stats.json to your project root with some aggregated data about the build, e.g. list of HTML entities published, to be used to do CSS pruning.

This release represents 20 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 @moorereason, @jaywilliams, and @satotake 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 @davidsneighbour and @kaushalmodi for all the great work on the documentation site.

Many have also been busy writing and fixing the documentation in hugoDocs, which has received 14 contributions by 7 contributors. A special thanks to @bep, @coliff, @dmgawel, and @jasikpark for their work on the documentation site.

Hugo now has:

Enhancements

Templates

Other

Fixes

Other