Merge commit '9cabb46f68bae01aeb1859727dcb21e8a10f5ec7'

This commit is contained in:
Bjørn Erik Pedersen 2020-10-30 09:50:15 +01:00
commit 3553fc533a
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
16 changed files with 29 additions and 41 deletions

View file

@ -77,9 +77,9 @@ produces this HTML:
Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes: Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes:
```md ```go-html-template
{{</* ref "document.md#reference */>}} {{</* ref "document.md#reference" */>}}
{{</* relref "document.md#reference */>}} {{</* relref "document.md#reference" */>}}
``` ```
Generate a custom heading ID by including an attribute. For example: Generate a custom heading ID by including an attribute. For example:

View file

@ -182,7 +182,7 @@ kind="section"
Keywords available for `_target`: Keywords available for `_target`:
path path
: A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. : A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching support double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down.
kind kind
: A Glob pattern matching the Page's Kind(s), e.g. "{home,section}". : A Glob pattern matching the Page's Kind(s), e.g. "{home,section}".

View file

@ -360,7 +360,7 @@ This article has 101 words.
### Query a singular/plural translation ### Query a singular/plural translation
In other to meet singular/plural requirement, you must pass a dictionary (map) data with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property. In order to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
``` ```
{{ i18n "readingTime" .ReadingTime }} {{ i18n "readingTime" .ReadingTime }}
@ -374,7 +374,7 @@ one = "One minute to read"
other = "{{.Count}} minutes to read" other = "{{.Count}} minutes to read"
``` ```
Assume `.ReadingTime.Count` in the context has value is 525600. The result will be: Assume `.ReadingTime.Count` in the context has value of 525600. The result will be:
``` ```
525600 minutes to read 525600 minutes to read
@ -386,7 +386,7 @@ If `.ReadingTime.Count` in the context has value is 1. The result is:
One minutes to read One minutes to read
``` ```
In case you need to pass a custom data: (`"(dict Count" 25)` is minimum requirment) In case you need to pass custom data: (`(dict "Count" 25)` is minimum requirement)
``` ```
{{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }} {{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }}

View file

@ -192,7 +192,7 @@ By using taxonomic weight, the same piece of content can appear in different pos
Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight-date). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/). Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight-date). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
{{% /note %}} {{% /note %}}
## Add custom metadata a Taxonomy or Term ## Add custom metadata to a Taxonomy or Term
If you need to add custom metadata to your taxonomy terms, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in it's front matter. Continuing with our 'Actors' example, let's say you want to add a Wikipedia page link to each actor. Your terms pages would be something like this: If you need to add custom metadata to your taxonomy terms, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in it's front matter. Continuing with our 'Actors' example, let's say you want to add a Wikipedia page link to each actor. Your terms pages would be something like this:

View file

@ -1,7 +1,7 @@
--- ---
title: strings.Repeat title: strings.Repeat
# linktitle: # linktitle:
description: Returns a string consisting of count copies of the string s. description: Returns INPUT repeated COUNT times.
godocref: godocref:
date: 2018-05-31 date: 2018-05-31
publishdate: 2018-05-31 publishdate: 2018-05-31
@ -11,21 +11,14 @@ menu:
docs: docs:
parent: "functions" parent: "functions"
keywords: [strings] keywords: [strings]
signature: ["strings.Repeat INPUT COUNT"] signature: ["strings.Repeat COUNT INPUT"]
workson: [] workson: []
hugoversion: hugoversion:
relatedfuncs: [] relatedfuncs: []
deprecated: false deprecated: false
--- ---
`strings.Repeat` provides the Go [`strings.Repeat`](https://golang.org/pkg/strings/#Repeat) function for Hugo templates. It takes a string and a count, and returns a string with consisting of count copies of the string argument.
```
{{ strings.Repeat "yo" 3 }} → "yoyoyo"
```
`strings.Repeat` *requires* the second argument, which tells the function how many times to repeat the first argument; there is no default. However, it can be used as a pipeline:
``` ```
{{ strings.Repeat 3 "yo" }} → "yoyoyo"
{{ "yo" | strings.Repeat 3 }} → "yoyoyo" {{ "yo" | strings.Repeat 3 }} → "yoyoyo"
``` ```

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

View file

@ -1,8 +1,8 @@
--- ---
date: 2020-10-06 date: 2020-10-06
title: "0.76.0" title: "Multiple Cascades With Page Filters"
description: "0.76.0" description: "Hugo 0.76.0 brings multiple cascade blocks per page with filters for path, kind and language."
categories: ["Releases"] categories: ["Releases"]
--- ---
@ -26,7 +26,7 @@ Tasks that were earlier hard/borderline impossible to do are now simple. One com
A related improvement is that the [build option](https://gohugo.io/content-management/build-options/#readout) `render` is now an enum. In addition to turning on/off rendering of a given page you can tell Hugo to not render, but you want to preserve the `.Permalink`, useful for SPA applications. A related improvement is that the [build option](https://gohugo.io/content-management/build-options/#readout) `render` is now an enum. In addition to turning on/off rendering of a given page you can tell Hugo to not render, but you want to preserve the `.Permalink`, useful for SPA applications.
This release represents **35 contributions by 8 contributors** to the main Hugo code base.[@dependabot[bot]](https://github.com/apps/dependabot) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@bep](https://github.com/bep), [@ai](https://github.com/ai), and [@jmooring](https://github.com/jmooring) for their ongoing contributions. This release represents **35 contributions by 8 contributors** to the main Hugo code base. A big shoutout to [@bep](https://github.com/bep), [@ai](https://github.com/ai), and [@jmooring](https://github.com/jmooring) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site. And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),

View file

@ -1,20 +1,17 @@
--- ---
date: 2020-10-07 date: 2020-10-07
title: "Hugo 0.76.1: A couple of Bug Fixes" title: "Hugo 0.76.1: One Bug Fix"
description: "This version fixes a couple of bugs introduced in 0.76.0." description: "This version fixes one bug introduced in 0.76.0."
categories: ["Releases"] categories: ["Releases"]
images: images:
- images/blog/hugo-bug-poster.png - images/blog/hugo-bug-poster.png
--- ---
With this, we should finally have proper [plural numerals in Russian etc.](https://discourse.gohugo.io/t/0-76-0-i18n-gone-wrong/28689/7?u=bep):
This is a bug-fix release with a couple of important fixes.
* langs/i18n: Fix i18n .Count regression [f9e798e8](https://github.com/gohugoio/hugo/commit/f9e798e8c4234bd60277e3cb10663ba254d4ecb7) [@bep](https://github.com/bep) [#7787](https://github.com/gohugoio/hugo/issues/7787) * langs/i18n: Fix i18n .Count regression [f9e798e8](https://github.com/gohugoio/hugo/commit/f9e798e8c4234bd60277e3cb10663ba254d4ecb7) [@bep](https://github.com/bep) [#7787](https://github.com/gohugoio/hugo/issues/7787)
* Fix typo in 0.76.0 release note [ee56efff](https://github.com/gohugoio/hugo/commit/ee56efffcb3f81120b0d3e0297b4fb5966124354) [@digitalcraftsman](https://github.com/digitalcraftsman)

View file

@ -1,16 +1,14 @@
--- ---
date: 2020-10-07 date: 2020-10-07
title: "Hugo 0.76.2: A couple of Bug Fixes" title: "Hugo 0.76.2: One Bug Fix"
description: "This version fixes a couple of bugs introduced in 0.76.0." description: "This release reverts to an older (and working) version of the JS minifier."
categories: ["Releases"] categories: ["Releases"]
images: images:
- images/blog/hugo-bug-poster.png - images/blog/hugo-bug-poster.png
--- ---
This is a bug-fix release with one important fix. This is a bug-fix release with one important fix.
* Revert "deps: Update to github.com/tdewolff/minify v2.9.4" [6dd60fca](https://github.com/gohugoio/hugo/commit/6dd60fca73ff96b48064bb8c6586631a2370ffc6) [@bep](https://github.com/bep) [#7792](https://github.com/gohugoio/hugo/issues/7792) * Revert "deps: Update to github.com/tdewolff/minify v2.9.4" [6dd60fca](https://github.com/gohugoio/hugo/commit/6dd60fca73ff96b48064bb8c6586631a2370ffc6) [@bep](https://github.com/bep) [#7792](https://github.com/gohugoio/hugo/issues/7792)

View file

@ -1,8 +1,8 @@
--- ---
date: 2020-10-12 date: 2020-10-12
title: "Hugo 0.76.4: A couple of Bug Fixes" title: "Hugo 0.76.4: One Bug Fix"
description: "This version fixes a couple of bugs introduced in 0.76.0." description: "This version fixes one more i18n regression from 0.76.0."
categories: ["Releases"] categories: ["Releases"]
images: images:
- images/blog/hugo-bug-poster.png - images/blog/hugo-bug-poster.png

View file

@ -30,7 +30,7 @@ For example, this two column layout shown below. I used CSS Columns with a `bre
For the ripple effects on the section headings, I used JS to prepend a `<canvas>` element then animated it with `RequestAnimationFrame`. It adds a nice bit of movement on the page. For the ripple effects on the section headings, I used JS to prepend a `<canvas>` element then animated it with `RequestAnimationFrame`. It adds a nice bit of movement on the page.
On the [Hartwell Profitmaker](https://www.hartwell-insurance.com/profitmaker/) section, I toyed with the idea of using Vue.js for the calculator, but after giving it some thought, I decided to code in Vanilla. The result, all of the site JS comes in at 3.2KB! On the Hartwell Profitmaker section, I toyed with the idea of using Vue.js for the calculator, but after giving it some thought, I decided to code in Vanilla. The result, all of the site JS comes in at 3.2KB!
The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up I could focus fully on the frontend. The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up I could focus fully on the frontend.

View file

@ -32,7 +32,7 @@ The following starter kits are developed by active members of the Hugo community
[addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md [addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md
[amp]: https://www.ampproject.org/ [amp]: https://amp.dev
[Blaupause]: https://github.com/fspoettel/blaupause [Blaupause]: https://github.com/fspoettel/blaupause
[GOHUGO AMP]: https://github.com/wildhaber/gohugo-amp [GOHUGO AMP]: https://github.com/wildhaber/gohugo-amp
[gohugodocs]: https://gohugo-amp.gohugohq.com/ [gohugodocs]: https://gohugo-amp.gohugohq.com/

View file

@ -121,7 +121,7 @@ See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
: the Page content stripped of HTML as a `[]string` using Go's [`strings.Fields`](https://golang.org/pkg/strings/#Fields) to split `.Plain` into a slice. : the Page content stripped of HTML as a `[]string` using Go's [`strings.Fields`](https://golang.org/pkg/strings/#Fields) to split `.Plain` into a slice.
.Prev .Prev
: Points down to the previous [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight-date-linktitle-filepath)). Example: `{{if .PrevPage}}{{.PrevPage.Permalink}}{{end}}`. Calling `.Prev` from the last page returns `nil`. : Points down to the previous [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight-date-linktitle-filepath)). Example: `{{if .Prev}}{{.Prev.Permalink}}{{end}}`. Calling `.Prev` from the last page returns `nil`.
.PrevInSection .PrevInSection
: Points down to the previous [regular page](/variables/site/#site-pages) below the same top level section (e.g. `/blog`). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight-date-linktitle-filepath). Example: `{{if .PrevInSection}}{{.PrevInSection.Permalink}}{{end}}`. Calling `.PrevInSection` from the last page returns `nil`. : Points down to the previous [regular page](/variables/site/#site-pages) below the same top level section (e.g. `/blog`). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight-date-linktitle-filepath). Example: `{{if .PrevInSection}}{{.PrevInSection.Permalink}}{{end}}`. Calling `.PrevInSection` from the last page returns `nil`.

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.75.1" HUGO_VERSION = "0.76.5"
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.75.1" HUGO_VERSION = "0.76.5"
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.75.1" HUGO_VERSION = "0.76.5"
[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.75.1" HUGO_VERSION = "0.76.5"
[context.next.environment] [context.next.environment]
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB