From 6f56a636f6bc1c418c235ec5ab8f26585998c483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 10 Apr 2020 10:49:41 +0200 Subject: [PATCH] Update 0.69.0-relnotes.md --- ....69.0-relnotes.md => 0.69.0-relnotes-ready.md} | 15 +++++++++++++++ 1 file changed, 15 insertions(+) rename temp/{0.69.0-relnotes.md => 0.69.0-relnotes-ready.md} (80%) diff --git a/temp/0.69.0-relnotes.md b/temp/0.69.0-relnotes-ready.md similarity index 80% rename from temp/0.69.0-relnotes.md rename to temp/0.69.0-relnotes-ready.md index a97ade642..da20f3b80 100644 --- a/temp/0.69.0-relnotes.md +++ b/temp/0.69.0-relnotes-ready.md @@ -1,3 +1,18 @@ +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: + +```go-html-template +{{ $css := resources.Get "css/main.css" }} +{{ $css = $css | resources.PostCSS }} +{{ if hugo.IsProduction }} +{{ $css = $css | minify | fingerprint | resources.PostProcess }} +{{ end }} + +``` + +The above uses the new [resources.PostProcess](https://gohugo.io/hugo-pipes/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](https://gohugo.io/getting-started/configuration/#configure-build) 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](https://gohugo.io/hugo-pipes/postprocess/#css-purging-with-postcss). + This release represents **20 contributions by 10 contributors** to the main Hugo code base.[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@jaywilliams](https://github.com/jaywilliams), and [@satotake](https://github.com/satotake) for their ongoing contributions. And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.