Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0
|
@ -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"
|
||||||
|
|
|
@ -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 }}
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
|
|
BIN
docs/content/en/news/0.86.0-relnotes/featured.png
Normal file
After Width: | Height: | Size: 184 KiB |
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 300 KiB |
Before Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 125 KiB |