Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0

This commit is contained in:
Bjørn Erik Pedersen 2021-08-03 11:52:57 +02:00
commit 0934983529
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
238 changed files with 20 additions and 16 deletions

View file

@ -17,6 +17,12 @@ pluralizeListTitles = false
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below). # We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
disableAliases = true disableAliases = true
[minify]
[minify.tdewolff]
[minify.tdewolff.css]
[minify.tdewolff.html]
keepWhitespace = true
[module] [module]
[module.hugoVersion] [module.hugoVersion]
min = "0.56.0" min = "0.56.0"

View file

@ -34,7 +34,7 @@ link = "https://twitter.com/spf13"
date = "2017-01-07T00:00:00Z" date = "2017-01-07T00:00:00Z"
{{< /code-toggle >}} {{< /code-toggle >}}
Let's assume you want to grab Tweets from the last two years and present them in a random order. In conjunction with the [`where`](/functions/where/) and [`now`](/functions/now/) functions, you can limit our range to the last two years via `now.AddDate -2 0 0`, which represents a point in time 2 years, 0 days, and 0 hours before the time of your last site build. Let's assume you want to grab Tweets from the last two years and present them in a random order. In conjunction with the [`where`](/functions/where/) and [`now`](/functions/now/) functions, you can limit our range to the last two years via `now.AddDate -2 0 0`, which represents a point in time 2 years, 0 months, and 0 days before the time of your last site build.
{{< code file="partials/templates/random-tweets.html" download="tweets.html" >}} {{< code file="partials/templates/random-tweets.html" download="tweets.html" >}}
{{ range where $.Site.Data.tweets.tweet "date" "ge" (now.AddDate -2 0 0) | shuffle }} {{ range where $.Site.Data.tweets.tweet "date" "ge" (now.AddDate -2 0 0) | shuffle }}

View file

@ -133,6 +133,9 @@ buildFuture (false)
caches caches
: See [Configure File Caches](#configure-file-caches) : See [Configure File Caches](#configure-file-caches)
cascade {{< new-in "0.86.0" >}}
: Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
canonifyURLs (false) canonifyURLs (false)
: Enable to turn relative URLs into absolute. : Enable to turn relative URLs into absolute.

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View file

@ -1,16 +1,16 @@
--- ---
date: 2021-07-21 date: 2021-07-21
title: "0.86.0" title: "Hugo 0.86.0: Cascade in Config"
description: "0.86.0" description: "Hugo 0.86.0 adds cascade keyword to site config, much improved \"active menu item\" logic for section pages, and more."
categories: ["Releases"] categories: ["Releases"]
--- ---
This is release is a set of smaller fixes and improvements. Some of the more noteable: This release is a set of smaller fixes and improvements. Some of the more notable:
You can now have a top level [cascade](https://gohugo.io/content-management/front-matter#front-matter-cascade) (or one per language, if needed) section in your site configuration (e.g. `config.toml`). This way you can control default front matter values from outside of the content files. You can now have a top level [cascade](https://gohugo.io/content-management/front-matter#front-matter-cascade) (or one per language, if needed) section in your site configuration (e.g. `config.toml`). This way you can control default front matter values from outside of the content files.
Hugo's [Menu system](https://gohugo.io/content-management/menus/) works good, but hasn't been particulary easy to set the active menu state for section pages without a menu defintion. We have had the option [Section Menu for Lazy Bloggers](https://gohugo.io/templates/menu-templates/#section-menu-for-lazy-bloggers). That helped for the common case, but we have now made it behave more sensible out of the box: `$section.HasMenuCurrent` will now always return true for any descendant of that section. To support this for menu defintions in the site config, we have added a new `pageRef` option on [MenuEntry](https://gohugo.io/variables/menus/#menu-entry-variables): Hugo's [Menu system](https://gohugo.io/content-management/menus/) works well, but hasn't been particularly easy to set the active menu state for section pages without a menu definition. We have had the option [Section Menu for Lazy Bloggers](https://gohugo.io/templates/menu-templates/#section-menu-for-lazy-bloggers). That helped for the common case, but we have now made it behave more sensible out of the box: `$page.HasMenuCurrent $sectionMenuEntry` will now always return true for any descendant of that section. To support this for menu definitions in the site config, we have added a new `pageRef` option on [MenuEntry](https://gohugo.io/variables/menus/#menu-entry-variables):
```toml ```toml
[[menus.main]] [[menus.main]]
@ -54,8 +54,3 @@ Hugo now has:
* Fix default values when loading from config dir [ae6cf93c](https://github.com/gohugoio/hugo/commit/ae6cf93c84c3584b111f4b9fa3fb4e3f63d37915) [@bep](https://github.com/bep) [#8763](https://github.com/gohugoio/hugo/issues/8763) * Fix default values when loading from config dir [ae6cf93c](https://github.com/gohugoio/hugo/commit/ae6cf93c84c3584b111f4b9fa3fb4e3f63d37915) [@bep](https://github.com/bep) [#8763](https://github.com/gohugoio/hugo/issues/8763)
* Fix the deprecation error/warn log levels [a70da2b7](https://github.com/gohugoio/hugo/commit/a70da2b74a6af0834cce9668cdb6acdb1c86a4c0) [@bep](https://github.com/bep) * Fix the deprecation error/warn log levels [a70da2b7](https://github.com/gohugoio/hugo/commit/a70da2b74a6af0834cce9668cdb6acdb1c86a4c0) [@bep](https://github.com/bep)
* Fix transparency problem when converting 32-bit images to WebP [8f40f34c](https://github.com/gohugoio/hugo/commit/8f40f34cd10a98598bb822ec633fd5d0ea64b612) [@bep](https://github.com/bep) [#8729](https://github.com/gohugoio/hugo/issues/8729) * Fix transparency problem when converting 32-bit images to WebP [8f40f34c](https://github.com/gohugoio/hugo/commit/8f40f34cd10a98598bb822ec633fd5d0ea64b612) [@bep](https://github.com/bep) [#8729](https://github.com/gohugoio/hugo/issues/8729)

View file

@ -1,8 +1,8 @@
--- ---
date: 2021-07-30 date: 2021-07-30
title: "Hugo 0.86.1: A couple of Bug Fixes" title: "Hugo 0.86.1: One Bug Fix"
description: "This version fixes a couple of bugs introduced in 0.86.0." description: "This version fixes a of bug introduced in 0.86.0."
categories: ["Releases"] categories: ["Releases"]
images: images:
- images/blog/hugo-bug-poster.png - images/blog/hugo-bug-poster.png

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify" command = "hugo --gc --minify"
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.85.0" HUGO_VERSION = "0.86.1"
HUGO_ENV = "production" HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo" command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment] [context.split1.environment]
HUGO_VERSION = "0.85.0" HUGO_VERSION = "0.86.1"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview] [context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.85.0" HUGO_VERSION = "0.86.1"
[context.branch-deploy] [context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment] [context.branch-deploy.environment]
HUGO_VERSION = "0.85.0" HUGO_VERSION = "0.86.1"
[context.next.environment] [context.next.environment]
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Some files were not shown because too many files have changed in this diff Show more