Squashed 'docs/' changes from bcc4f9324..4c81c6c2a

4c81c6c2a live reload: add section about `--navigateToChanged`
271014257 Update netify hugo version to 0.83.1
14199cff1 Add pull_request event
0c33b05de Hosting on GitHub: Little wording fixes and update Ubuntu runner in example workflow to 20.04 (#1457)
e47b6c33a Hugo Modules plural typo (#1266)
0f2bbacdd Add node_modules to .gitignore
1d645d79f Overhaul scratch.md (#1451)
572766889 Add link to golang regex syntax, change modified date
21b0c7459 Add info about contentType config
de7d96fa2 Document Go template's multiline support
0c8f2dcb1 Avoid scratch usage
696fa92e1 Rename scratch var
44193f267 Update usage instructions
4230f8fa5 Rename and refactor shortcode
e9953751e Strip leading whitespaces
d61a58010 Add `insertpages` shortcode
04d30677d Mention WebP under 'Target Format' (#1431)
946784508 Update lookup-order.md (#1443)
a7b587988 Update index.md
27907f7ea netlify: Hugo 0.83.1
044d37e57 Merge branch 'tempv0.83.1'
b81aedb03 Fix page `.Kind`
fcf7775ad releaser: Add release notes to /docs for release of 0.83.1
9b39c77c8 fix typo in 0.83 release notes
1c38993ce Update index.md
45b8aefa6 Update index.md
43902dfaa Update index.md
3d959c7ae Merge branch 'tempv0.83.0'
6c22dc327 Fix URL
497ea3224 Use Hugo version badge shortcode
a182d10dd releaser: Add release notes to /docs for release of 0.83.0
287fd9ac0 docs: Fix shortcode
e789c879a docs: Regenerate docs helper
1666c7f31 docs: Regenerate CLI docs
117de1d12 Merge commit 'c239c643fee10bfa217cb108755b798f8f5f3b10'
a6bf3f7d9 docs: Regen docs helper

git-subtree-dir: docs
git-subtree-split: 4c81c6c2ace6c23d0d5d24ee37e6a2f30acba01e
This commit is contained in:
Bjørn Erik Pedersen 2021-06-08 18:46:58 +02:00
parent c239c643fe
commit 32ba623541
60 changed files with 1177 additions and 157 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
/.idea
/public
node_modules
nohup.out
.DS_Store
trace.out

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo"
slug: hugo
url: /commands/hugo/
@ -81,4 +80,3 @@ hugo [flags]
* [hugo server](/commands/hugo_server/) - A high performance webserver
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo check"
slug: hugo_check
url: /commands/hugo_check/
@ -37,4 +36,3 @@ Contains some verification checks
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo check ulimit"
slug: hugo_check_ulimit
url: /commands/hugo_check_ulimit/
@ -45,4 +44,3 @@ hugo check ulimit [flags]
* [hugo check](/commands/hugo_check/) - Contains some verification checks
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo config"
slug: hugo_config
url: /commands/hugo_config/
@ -45,4 +44,3 @@ hugo config [flags]
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo config mounts](/commands/hugo_config_mounts/) - Print the configured file mounts
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo config mounts"
slug: hugo_config_mounts
url: /commands/hugo_config_mounts/
@ -40,4 +39,3 @@ hugo config mounts [flags]
* [hugo config](/commands/hugo_config/) - Print the site configuration
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo convert"
slug: hugo_convert
url: /commands/hugo_convert/
@ -47,4 +46,3 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo convert toJSON"
slug: hugo_convert_toJSON
url: /commands/hugo_convert_tojson/
@ -47,4 +46,3 @@ hugo convert toJSON [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo convert toTOML"
slug: hugo_convert_toTOML
url: /commands/hugo_convert_totoml/
@ -47,4 +46,3 @@ hugo convert toTOML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo convert toYAML"
slug: hugo_convert_toYAML
url: /commands/hugo_convert_toyaml/
@ -47,4 +46,3 @@ hugo convert toYAML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo deploy"
slug: hugo_deploy
url: /commands/hugo_deploy/
@ -54,4 +53,3 @@ hugo deploy [flags]
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo env"
slug: hugo_env
url: /commands/hugo_env/
@ -12,6 +11,9 @@ Print Hugo version and environment info
Print Hugo version and environment info. This is useful in Hugo bug reports.
If you add the -v flag, you will get a full dependency list.
```
hugo env [flags]
```
@ -44,4 +46,3 @@ hugo env [flags]
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo gen"
slug: hugo_gen
url: /commands/hugo_gen/
@ -40,4 +39,3 @@ A collection of several useful generators.
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo gen autocomplete"
slug: hugo_gen_autocomplete
url: /commands/hugo_gen_autocomplete/
@ -58,4 +57,3 @@ hugo gen autocomplete [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo gen chromastyles"
slug: hugo_gen_chromastyles
url: /commands/hugo_gen_chromastyles/
@ -49,4 +48,3 @@ hugo gen chromastyles [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo gen doc"
slug: hugo_gen_doc
url: /commands/hugo_gen_doc/
@ -51,4 +50,3 @@ hugo gen doc [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo gen man"
slug: hugo_gen_man
url: /commands/hugo_gen_man/
@ -47,4 +46,3 @@ hugo gen man [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo import"
slug: hugo_import
url: /commands/hugo_import/
@ -43,4 +42,3 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo import jekyll"
slug: hugo_import_jekyll
url: /commands/hugo_import_jekyll/
@ -47,4 +46,3 @@ hugo import jekyll [flags]
* [hugo import](/commands/hugo_import/) - Import your site from others.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo list"
slug: hugo_list
url: /commands/hugo_list/
@ -46,4 +45,3 @@ List requires a subcommand, e.g. `hugo list drafts`.
* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired
* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo list all"
slug: hugo_list_all
url: /commands/hugo_list_all/
@ -44,4 +43,3 @@ hugo list all [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo list drafts"
slug: hugo_list_drafts
url: /commands/hugo_list_drafts/
@ -44,4 +43,3 @@ hugo list drafts [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo list expired"
slug: hugo_list_expired
url: /commands/hugo_list_expired/
@ -44,4 +43,3 @@ hugo list expired [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo list future"
slug: hugo_list_future
url: /commands/hugo_list_future/
@ -44,4 +43,3 @@ hugo list future [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod"
slug: hugo_mod
url: /commands/hugo_mod/
@ -84,4 +83,3 @@ See https://gohugo.io/hugo-modules/ for more information.
* [hugo mod vendor](/commands/hugo_mod_vendor/) - Vendor all module dependencies into the _vendor directory.
* [hugo mod verify](/commands/hugo_mod_verify/) - Verify dependencies.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod clean"
slug: hugo_mod_clean
url: /commands/hugo_mod_clean/
@ -52,4 +51,3 @@ hugo mod clean [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod get"
slug: hugo_mod_get
url: /commands/hugo_mod_get/
@ -70,4 +69,3 @@ hugo mod get [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod graph"
slug: hugo_mod_graph
url: /commands/hugo_mod_graph/
@ -46,4 +45,3 @@ hugo mod graph [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod init"
slug: hugo_mod_init
url: /commands/hugo_mod_init/
@ -51,4 +50,3 @@ hugo mod init [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod npm"
slug: hugo_mod_npm
url: /commands/hugo_mod_npm/
@ -45,4 +44,3 @@ hugo mod npm [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
* [hugo mod npm pack](/commands/hugo_mod_npm_pack/) - Experimental: Prepares and writes a composite package.json file for your project.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod npm pack"
slug: hugo_mod_npm_pack
url: /commands/hugo_mod_npm_pack/
@ -54,4 +53,3 @@ hugo mod npm pack [flags]
* [hugo mod npm](/commands/hugo_mod_npm/) - Various npm helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod tidy"
slug: hugo_mod_tidy
url: /commands/hugo_mod_tidy/
@ -40,4 +39,3 @@ hugo mod tidy [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod vendor"
slug: hugo_mod_vendor
url: /commands/hugo_mod_vendor/
@ -47,4 +46,3 @@ hugo mod vendor [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo mod verify"
slug: hugo_mod_verify
url: /commands/hugo_mod_verify/
@ -46,4 +45,3 @@ hugo mod verify [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo new"
slug: hugo_new
url: /commands/hugo_new/
@ -79,4 +78,3 @@ hugo new [path] [flags]
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo new site"
slug: hugo_new_site
url: /commands/hugo_new_site/
@ -48,4 +47,3 @@ hugo new site [path] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo new theme"
slug: hugo_new_theme
url: /commands/hugo_new_theme/
@ -47,4 +46,3 @@ hugo new theme [name] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo server"
slug: hugo_server
url: /commands/hugo_server/
@ -92,4 +91,3 @@ hugo server [flags]
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -1,5 +1,4 @@
---
date: 2021-03-21
title: "hugo version"
slug: hugo_version
url: /commands/hugo_version/
@ -44,4 +43,3 @@ hugo version [flags]
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 21-Mar-2021

View file

@ -167,19 +167,21 @@ For color codes, see https://www.google.com/search?q=color+picker
**Note** that you also set a default background color to use, see [Image Processing Config](#image-processing-config).
### JPEG and Webp Quality
### JPEG and WebP Quality
Only relevant for JPEG and Webp images, values 1 to 100 inclusive, higher is better. Default is 75.
Only relevant for JPEG and WebP images, values 1 to 100 inclusive, higher is better. Default is 75.
```go
{{ $image.Resize "600x q50" }}
```
{{< new-in "0.83.0" >}} Webp support was added in Hugo 0.83.0.
{{< new-in "0.83.0" >}} WebP support was added in Hugo 0.83.0.
### Hint {{< new-in "0.83.0" >}}
### Hint
Hint about what type of image this is. Currently only used when encoding to Webp.
{{< new-in "0.83.0" >}}
Hint about what type of image this is. Currently only used when encoding to WebP.
Default value is `photo`.
@ -225,12 +227,14 @@ See https://github.com/disintegration/imaging for more. If you want to trade qua
By default the images is encoded in the source format, but you can set the target format as an option.
Valid values are `jpg`, `png`, `tif`, `bmp`, and `gif`.
Valid values are `jpg`, `png`, `tif`, `bmp`, `gif` and `webp`.
```go
{{ $image.Resize "600x jpg" }}
```
{{< new-in "0.83.0" >}} WebP support was added in Hugo 0.83.0.
## Image Processing Examples
_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
@ -272,10 +276,10 @@ You can configure an `imaging` section in `config.toml` with default image proce
# See https://github.com/disintegration/imaging
resampleFilter = "box"
# Default JPEG or WEBP quality setting. Default is 75.
# Default JPEG or WebP quality setting. Default is 75.
quality = 75
# Default hint about what type of image. Currently only used for Webp encoding.
# Default hint about what type of image. Currently only used for WebP encoding.
# Default is "photo".
# Valid values are "picture", "photo", "drawing", "icon", or "text".
hint = "photo"

View file

@ -1,6 +1,6 @@
---
title: .Scratch
description: Acts as a "scratchpad" to allow for writable page- or shortcode-scoped variables.
description: Acts as a "scratchpad" to store and manipulate data.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
@ -20,110 +20,124 @@ draft: false
aliases: [/extras/scratch/,/doc/scratch/]
---
In most cases you can do okay without `Scratch`, but due to scoping issues, there are many use cases that aren't solvable in Go Templates without `Scratch`'s help.
`.Scratch` is available as methods on `Page` and `Shortcode`. Since Hugo 0.43 you can also create a locally scoped `Scratch` using the template func `newScratch`.
Scratch is a Hugo feature designed to conveniently manipulate data in a Go Template world. It is either a Page or Shortcode method for which the resulting data will be attached to the given context, or it can live as a unique instance stored in a variable.
{{% note %}}
See [this Go issue](https://github.com/golang/go/issues/10608) for the main motivation behind Scratch.
Note that Scratch was initially created as a workaround for a [Go template scoping limitation](https://github.com/golang/go/issues/10608) that affected Hugo versions prior to 0.48. For a detailed analysis of `.Scratch` and contextual use cases, see [this blog post](https://regisphilibert.com/blog/2017/04/hugo-scratch-explained-variable/).
{{% /note %}}
{{% note %}}
For a detailed analysis of `.Scratch` and in context use cases, see this [post](https://regisphilibert.com/blog/2017/04/hugo-scratch-explained-variable/).
{{% /note %}}
### Contexted `.Scratch` vs. local `newScratch`
## Get a Scratch
Since Hugo 0.43, there are two different ways of using Scratch:
From Hugo `0.43` you can also create a locally scoped `Scratch` by calling `newScratch`:
#### The Page's `.Scratch`
`.Scratch` is available as a Page method or a Shortcode method and attaches the "scratched" data to the given page. Either a Page or a Shortcode context is required to use `.Scratch`.
```go-html-template
$scratch := newScratch
$scratch.Set "greeting" "Hello"
{{ .Scratch.Set "greeting" "bonjour" }}
{{ range .Pages }}
{{ .Scratch.Set "greeting" (print "bonjour" .Title) }}
{{ end }}
```
A `Scratch` is also added to both `Page` and `Shortcode`. `Scratch` has the following methods:
#### The local `newScratch`
{{< new-in "0.43.0" >}} A Scratch instance can also be assigned to any variable using the `newScratch` function. In this case, no Page or Shortcode context is required and the scope of the scratch is only local. The methods detailed below are available from the variable the Scratch instance was assigned to.
```go-html-template
{{ $data := newScratch }}
{{ $data.Set "greeting" "hola" }}
```
### Methods
A Scratch has the following methods:
{{% note %}}
Note that the following examples assume a [local Scratch instance](#the-local-newscratch) has been stored in `$scratch`.
{{% /note %}}
#### .Set
Set the given value to a given key
Set the value of a given key.
```go-html-template
{{ .Scratch.Set "greeting" "Hello" }}
{{ $scratch.Set "greeting" "Hello" }}
```
#### .Get
Get the value of a given key
Get the value of a given key.
```go-html-template
{{ .Scratch.Set "greeting" "Hello" }}
{{ $scratch.Set "greeting" "Hello" }}
----
{{ .Scratch.Get "greeting" }} > Hello
{{ $scratch.Get "greeting" }} > Hello
```
#### .Add
Will add a given value to existing value of the given key.
Add a given value to existing value(s) of the given key.
For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
```go-html-template
{{ .Scratch.Add "greetings" "Hello" }}
{{ .Scratch.Add "greetings" "Welcome" }}
{{ $scratch.Add "greetings" "Hello" }}
{{ $scratch.Add "greetings" "Welcome" }}
----
{{ .Scratch.Get "greetings" }} > HelloWelcome
{{ $scratch.Get "greetings" }} > HelloWelcome
```
```go-html-template
{{ .Scratch.Add "total" 3 }}
{{ .Scratch.Add "total" 7 }}
{{ $scratch.Add "total" 3 }}
{{ $scratch.Add "total" 7 }}
----
{{ .Scratch.Get "total" }} > 10
{{ $scratch.Get "total" }} > 10
```
```go-html-template
{{ .Scratch.Add "greetings" (slice "Hello") }}
{{ .Scratch.Add "greetings" (slice "Welcome" "Cheers") }}
{{ $scratch.Add "greetings" (slice "Hello") }}
{{ $scratch.Add "greetings" (slice "Welcome" "Cheers") }}
----
{{ .Scratch.Get "greetings" }} > []interface {}{"Hello", "Welcome", "Cheers"}
{{ $scratch.Get "greetings" }} > []interface {}{"Hello", "Welcome", "Cheers"}
```
#### .SetInMap
Takes a `key`, `mapKey` and `value` and add a map of `mapKey` and `value` to the given `key`.
Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
```go-html-template
{{ .Scratch.SetInMap "greetings" "english" "Hello" }}
{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }}
{{ $scratch.SetInMap "greetings" "english" "Hello" }}
{{ $scratch.SetInMap "greetings" "french" "Bonjour" }}
----
{{ .Scratch.Get "greetings" }} > map[french:Bonjour english:Hello]
{{ $scratch.Get "greetings" }} > map[french:Bonjour english:Hello]
```
#### .GetSortedMapValues
Returns array of values from `key` sorted by `mapKey`
Return an array of values from `key` sorted by `mapKey`.
```go-html-template
{{ .Scratch.SetInMap "greetings" "english" "Hello" }}
{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }}
{{ $scratch.SetInMap "greetings" "english" "Hello" }}
{{ $scratch.SetInMap "greetings" "french" "Bonjour" }}
----
{{ .Scratch.GetSortedMapValues "greetings" }} > [Hello Bonjour]
{{ $scratch.GetSortedMapValues "greetings" }} > [Hello Bonjour]
```
#### .Delete
Removes the given key
{{< new-in "0.38.0" >}} Remove the given key.
```go-html-template
{{ .Scratch.Delete "greetings" }}
{{ $scratch.Set "greeting" "Hello" }}
----
{{ $scratch.Delete "greeting" }}
```
#### .Values
`Values` returns the raw backing map. Note that you should just use this method on the locally scoped `Scratch` instances you obtain via `newScratch`, not
`.Page.Scratch` etc., as that will lead to concurrency issues.
## Scope
The scope of the backing data is global for the given `Page` or `Shortcode`, and spans partial and shortcode includes.
Note that `.Scratch` from a shortcode will return the shortcode's `Scratch`, which in most cases is what you want. If you want to store it in the page scoped Scratch, then use `.Page.Scratch`.
Return the raw backing map. Note that you should only use this method on the locally scoped Scratch instances you obtain via [`newScratch`](#the-local-newscratch), not `.Page.Scratch` etc., as that will lead to concurrency issues.
[pagevars]: /variables/page/

View file

@ -167,6 +167,11 @@ Most Hugo builds are so fast that you may not notice the change unless looking d
Hugo injects the LiveReload `<script>` before the closing `</body>` in your templates and will therefore not work if this tag is not present..
{{% /note %}}
### Redirect automatically to the page you just saved
When you are working with more than one document and want to see the markup as real-time as possible it's not ideal to keep jumping between them.
Fortunately Hugo has an easy, embedded and simple solution for this. It's the flag `--navigateToChanged`.
### Disable LiveReload
LiveReload works by injecting JavaScript into the pages Hugo generates. The script creates a connection from the browser's web socket client to the Hugo web socket server.

View file

@ -17,7 +17,7 @@ toc: true
aliases: [/tutorials/github-pages-blog/]
---
GitHub provides free and fast static hosting over SSL for personal, organization, or project pages directly from a GitHub repository via its [GitHub Pages service][] and automate development workflows and build with [GitHub Actions].
GitHub provides free and fast static hosting over SSL for personal, organization, or project pages directly from a GitHub repository via its [GitHub Pages service][] and automating development workflows and build with [GitHub Actions].
## Assumptions
@ -45,9 +45,9 @@ This is a much simpler setup as your Hugo files and generated content are publis
## Build Hugo With GitHub Action
GitHub execute your software development workflows. Everytime you push your code on the Github repository, Github Action will build the site automatically.
GitHub executes your software development workflows. Everytime you push your code on the Github repository, Github Actions will build the site automatically.
Create a file in `.github/workflows/gh-pages.yml` containing the following content (based on https://github.com/marketplace/actions/hugo-setup ):
Create a file in `.github/workflows/gh-pages.yml` containing the following content (based on [actions-hugo](https://github.com/marketplace/actions/hugo-setup)):
```yml
name: github pages
@ -56,10 +56,11 @@ on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
@ -77,12 +78,13 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
For more advanced settings https://github.com/marketplace/actions/hugo-setup
For more advanced settings [actions-hugo](https://github.com/marketplace/actions/hugo-setup) and [actions-gh-pages](https://github.com/marketplace/actions/github-pages-action).
## Use a Custom Domain

View file

@ -67,14 +67,14 @@ For production:
{{< code file="netlify.toml" codeLang="toml" >}}
[context.production.environment]
HUGO_VERSION = "0.82.1"
HUGO_VERSION = "0.83.1"
{{< /code >}}
For testing:
{{< code file="netlify.toml" codeLang="toml" >}}
[context.deploy-preview.environment]
HUGO_VERSION = "0.82.1"
HUGO_VERSION = "0.83.1"
{{< /code >}}
The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:

View file

@ -4,7 +4,7 @@ linktitle: Hugo Deploy
description: You can upload your site to GCS, S3, or Azure using the Hugo CLI.
date: 2019-05-30
publishdate: 2019-05-30
lastmod: 2019-05-30
lastmod: 2021-05-03
categories: [hosting and deployment]
keywords: [s3,gcs,azure,hosting,deployment]
authors: [Robert van Gent]
@ -95,10 +95,13 @@ cloudFrontDistributionID = <ID>
# [[deployment.matchers]] configure behavior for files that match the Pattern.
# See https://golang.org/pkg/regexp/syntax/ for pattern syntax.
# Pattern searching is stopped on first match.
# Samples:
[[deployment.matchers]]
# Cache static assets for 1 year.
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true
@ -108,6 +111,12 @@ pattern = "^.+\\.(png|jpg)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false
[[deployment.matchers]]
# Set custom content type for /sitemap.xml
pattern = "^sitemap\\.xml$"
contentType = "application/xml"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(html|xml|json)$"
gzip = true

View file

@ -21,7 +21,7 @@ toc: true
You can combine modules in any combination you like, and even mount directories from non-Hugo projects, forming a big, virtual union file system.
Hugo Modules is powered by Go Modules. For more information about Go Modules, see:
Hugo Modules are powered by Go Modules. For more information about Go Modules, see:
- [https://github.com/golang/go/wiki/Modules](https://github.com/golang/go/wiki/Modules)
- [https://blog.golang.org/using-go-modules](https://blog.golang.org/using-go-modules)

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View file

@ -0,0 +1,133 @@
---
date: 2021-05-01
title: "Hugo 0.83: WebP Support!"
description: "WebP image encoding support, some important i18n fixes, and more."
categories: ["Releases"]
---
**Note:** If you use i18n, there is an unfortunate regression bug in this release (see [issue](https://github.com/gohugoio/hugo/issues/8492)). A patch release coming Sunday.
Hugo `0.83` finally brings [WebP](https://gohugo.io/content-management/image-processing/) image processing support. Note that you need the [extended version](https://gohugo.io/troubleshooting/faq/#i-get-tocss--this-feature-is-not-available-in-your-current-hugo-version) of Hugo to encode to WebP. If you want to target all Hugo versions, you may use a construct such as this:
```go-html-template
{{ $images := slice }}
{{ $images = $images | append ($img.Resize "300x") }}
{{ if hugo.IsExtended }}
{{ $images = $images | append ($img.Resize "300x webp") }}
{{ end }}
```
Also worth highlighting:
* Some important language/i18n fixes (thanks to [@jmooring](https://github.com/jmooring) for helping out with these):
* Fix multiple unknown language codes [7eb80a9e](https://github.com/gohugoio/hugo/commit/7eb80a9e6fcb6d31711effa20310cfefb7b23c1b) [@bep](https://github.com/bep) [#7838](https://github.com/gohugoio/hugo/issues/7838)
* Improve plural handling of floats [eebde0c2](https://github.com/gohugoio/hugo/commit/eebde0c2ac4964e91d26d8b0cf0ac43afcfd207f) [@bep](https://github.com/bep) [#8464](https://github.com/gohugoio/hugo/issues/8464)
* Revise the plural implementation [537c905e](https://github.com/gohugoio/hugo/commit/537c905ec103dc5adaf8a1b2ccdef5da7cc660fd) [@bep](https://github.com/bep) [#8454](https://github.com/gohugoio/hugo/issues/8454)[#7822](https://github.com/gohugoio/hugo/issues/7822)
* You can now use slice syntax in the sections permalinks config[2dc222ce](https://github.com/gohugoio/hugo/commit/2dc222cec4460595af8569165d1c498bb45aac84) [@bep](https://github.com/bep) [#8363](https://github.com/gohugoio/hugo/issues/8363).
This release represents **61 contributions by 9 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 [@dependabot[bot]](https://github.com/apps/dependabot), [@jmooring](https://github.com/jmooring), and [@anthonyfok](https://github.com/anthonyfok) 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.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **10 contributions by 5 contributors**. A special thanks to [@lupsa](https://github.com/lupsa), [@jmooring](https://github.com/jmooring), [@bep](https://github.com/bep), and [@arhuman](https://github.com/arhuman) for their work on the documentation site.
Hugo now has:
* 51594+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 432+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 370+ [themes](http://themes.gohugo.io/)
## Notes
* We have updated ESBUild to v0.11.16. There are no breaking changes on the API side, but you may want to read the release upstream release notes: https://github.com/evanw/esbuild/releases/tag/v0.10.0 https://github.com/evanw/esbuild/releases/tag/v0.11.0
## Enhancements
### Templates
* Remove the FuzzMarkdownify func for now [5656a908](https://github.com/gohugoio/hugo/commit/5656a908d837f2aa21837d39712b8ab4aa6db842) [@bep](https://github.com/bep)
### Output
* Make the shortcode template lookup for output formats stable [0d86a32d](https://github.com/gohugoio/hugo/commit/0d86a32d8f3031e2124c8005b680b597f3c0e558) [@bep](https://github.com/bep) [#7774](https://github.com/gohugoio/hugo/issues/7774)
* Only output mediaType once in docshelper JSON [7b4ade56](https://github.com/gohugoio/hugo/commit/7b4ade56dd50d89a91760fc5ef8e2f151874de96) [@bep](https://github.com/bep) [#8379](https://github.com/gohugoio/hugo/issues/8379)
### Other
* Regenerate docs helper [a9b52b41](https://github.com/gohugoio/hugo/commit/a9b52b41758d20ae4c10b71721b22175395c69e9) [@bep](https://github.com/bep)
* Regenerate CLI docs [b073a1c9](https://github.com/gohugoio/hugo/commit/b073a1c9723980eeb58717884006148dfc0e0c8e) [@bep](https://github.com/bep)
* Remove all dates from gendoc [4227cc1b](https://github.com/gohugoio/hugo/commit/4227cc1bd308d1ef1ea151c86f72f537b5e77b1d) [@bep](https://github.com/bep)
* Update getkin/kin-openapi v0.60.0 => v0.61. [3cc4fdd6](https://github.com/gohugoio/hugo/commit/3cc4fdd6f358263ffde33ccbf61546f073979e32) [@bep](https://github.com/bep)
* Update github.com/evanw/esbuild v0.11.14 => v0.11.16 [78c1a6a7](https://github.com/gohugoio/hugo/commit/78c1a6a7c6e14f006854ee97ec561abdcf6203fc) [@bep](https://github.com/bep)
* Remove .Site.Authors from embedded templates [f6745ad3](https://github.com/gohugoio/hugo/commit/f6745ad3588a7b3aaae228fec18fe0027affd566) [@jmooring](https://github.com/jmooring) [#4458](https://github.com/gohugoio/hugo/issues/4458)
* Don't treat a NotFound response for Delete as a fatal error. [f523e9f0](https://github.com/gohugoio/hugo/commit/f523e9f0fd0e0b0ce75879532caa834742297d16) [@vangent](https://github.com/vangent)
* Switch to deb packages of nodejs and python3-pygments [63cd05ce](https://github.com/gohugoio/hugo/commit/63cd05ce5ae308c496b848f6b11bcb3fdbdf5cb2) [@anthonyfok](https://github.com/anthonyfok)
* Install bin/node from node/14/stable [902535ef](https://github.com/gohugoio/hugo/commit/902535ef11fce449b377896ab7498c4799beb9ce) [@anthonyfok](https://github.com/anthonyfok)
* bump github.com/getkin/kin-openapi from 0.55.0 to 0.60.0 [70aebba0](https://github.com/gohugoio/hugo/commit/70aebba04d801fe6a3784394d25c433ffeb6d123) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/evanw/esbuild from 0.11.13 to 0.11.14 [3e3b7d44](https://github.com/gohugoio/hugo/commit/3e3b7d4474ea97a1990f303482a12f0c3031bd07) [@dependabot[bot]](https://github.com/apps/dependabot)
* Update to Chroma v0.9.1 [048418ba](https://github.com/gohugoio/hugo/commit/048418ba749d02eb3dde9d6895cedef2adaefefd) [@caarlos0](https://github.com/caarlos0)
* Improve plural handling of floats [eebde0c2](https://github.com/gohugoio/hugo/commit/eebde0c2ac4964e91d26d8b0cf0ac43afcfd207f) [@bep](https://github.com/bep) [#8464](https://github.com/gohugoio/hugo/issues/8464)
* bump github.com/evanw/esbuild from 0.11.12 to 0.11.13 [65c502cc](https://github.com/gohugoio/hugo/commit/65c502cc8110e49540cbe2b49ecd5a8ede9e67a1) [@dependabot[bot]](https://github.com/apps/dependabot)
* Revise the plural implementation [537c905e](https://github.com/gohugoio/hugo/commit/537c905ec103dc5adaf8a1b2ccdef5da7cc660fd) [@bep](https://github.com/bep) [#8454](https://github.com/gohugoio/hugo/issues/8454)[#7822](https://github.com/gohugoio/hugo/issues/7822)
* Update to "base: core20" [243951eb](https://github.com/gohugoio/hugo/commit/243951ebe9715d3da3968e96e6f60dcd53e25d92) [@anthonyfok](https://github.com/anthonyfok)
* bump github.com/frankban/quicktest from 1.11.3 to 1.12.0 [fe2ee028](https://github.com/gohugoio/hugo/commit/fe2ee028024836695c99e28595393588e3930136) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump google.golang.org/api from 0.44.0 to 0.45.0 [316d65cd](https://github.com/gohugoio/hugo/commit/316d65cd7049d60b0d5ac0080a87236198e74fc9) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/aws/aws-sdk-go from 1.37.11 to 1.38.23 [b95229ab](https://github.com/gohugoio/hugo/commit/b95229ab49ac2126aefe7802392ef34fdd021c3b) [@dependabot[bot]](https://github.com/apps/dependabot)
* Correct function name in comment [0551df09](https://github.com/gohugoio/hugo/commit/0551df090e6b2a391941bf7383b79c2dbc11d416) [@xhit](https://github.com/xhit)
* Upgraded github.com/evanw/esbuild v0.11.0 => v0.11.12 [057e5a22](https://github.com/gohugoio/hugo/commit/057e5a22af937459082c3096ba3095b343d1a8bf) [@bep](https://github.com/bep)
* Regen docs helper [fd96f65a](https://github.com/gohugoio/hugo/commit/fd96f65a3d7755e49b4a70fb276dfffcba4e541a) [@bep](https://github.com/bep)
* bump github.com/tdewolff/minify/v2 from 2.9.15 to 2.9.16 [d3a64708](https://github.com/gohugoio/hugo/commit/d3a64708f49139552ca79a199a4cbf6544375443) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump golang.org/x/text from 0.3.5 to 0.3.6 [3b56244f](https://github.com/gohugoio/hugo/commit/3b56244f425a72c783bb58c30542aeb4b045acca) [@dependabot[bot]](https://github.com/apps/dependabot)
* Remove some unreachable code [f5d3d635](https://github.com/gohugoio/hugo/commit/f5d3d635e6b88d7c5d304b80f04e7b4361349fd6) [@bep](https://github.com/bep)
* bump github.com/getkin/kin-openapi from 0.39.0 to 0.55.0 [0d3c42da](https://github.com/gohugoio/hugo/commit/0d3c42da56151325f16802b3b1a4105a21ce250e) [@dependabot[bot]](https://github.com/apps/dependabot)
* Some performance tweaks for the HTML elements collector [ef34dd8f](https://github.com/gohugoio/hugo/commit/ef34dd8f0e94e52ba6f1d5d607e4ac3ae98a7abb) [@bep](https://github.com/bep)
* Exclude comment and doctype elements from writeStats [bc80022e](https://github.com/gohugoio/hugo/commit/bc80022e033a5462d1a9ce541f40a050994011cc) [@dirkolbrich](https://github.com/dirkolbrich) [#8396](https://github.com/gohugoio/hugo/issues/8396)[#8417](https://github.com/gohugoio/hugo/issues/8417)
* Merge branch 'release-0.82.1' [2bb9496c](https://github.com/gohugoio/hugo/commit/2bb9496ce29dfe90e8b3664ed8cf7f895011b2d4) [@bep](https://github.com/bep)
* bump github.com/yuin/goldmark from 1.3.2 to 1.3.5 [3ddffd06](https://github.com/gohugoio/hugo/commit/3ddffd064dbacf62aa854b26ea8ddc5d15ba1ef8) [@jmooring](https://github.com/jmooring) [#8377](https://github.com/gohugoio/hugo/issues/8377)
* Remove duplicate references from release notes [6fc52d18](https://github.com/gohugoio/hugo/commit/6fc52d185a98b86c70b6ba862549cc6aae782691) [@jmooring](https://github.com/jmooring) [#8360](https://github.com/gohugoio/hugo/issues/8360)
* bump github.com/spf13/afero from 1.5.1 to 1.6.0 [73c3ae81](https://github.com/gohugoio/hugo/commit/73c3ae818a7fc78febff092ac74772a114a2cbd2) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/pelletier/go-toml from 1.8.1 to 1.9.0 [7ca118fd](https://github.com/gohugoio/hugo/commit/7ca118fdfd9f0d1c636ef5e266c9000a20099e03) [@dependabot[bot]](https://github.com/apps/dependabot)
* Add webp image encoding support [33d5f805](https://github.com/gohugoio/hugo/commit/33d5f805923eb50dfb309d024f6555c59a339846) [@bep](https://github.com/bep) [#5924](https://github.com/gohugoio/hugo/issues/5924)
* bump google.golang.org/api from 0.40.0 to 0.44.0 [509d39fa](https://github.com/gohugoio/hugo/commit/509d39fa6ddbba106c127b7923a41b0dcaea9381) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/nicksnyder/go-i18n/v2 from 2.1.1 to 2.1.2 [7725c41d](https://github.com/gohugoio/hugo/commit/7725c41d40b7009c2701a5ad3fa6bc9de57b88ee) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/rogpeppe/go-internal from 1.6.2 to 1.8.0 [5d36d801](https://github.com/gohugoio/hugo/commit/5d36d801534c0823697610fdb32e1eeb61f70e33) [@dependabot[bot]](https://github.com/apps/dependabot)
* Remove extraneous space from figure shortcode [9b34d42b](https://github.com/gohugoio/hugo/commit/9b34d42bb2ff05deaeeef63ff4b5b993f35f0451) [@jmooring](https://github.com/jmooring) [#8401](https://github.com/gohugoio/hugo/issues/8401)
* bump github.com/magefile/mage from 1.10.0 to 1.11.0 [c2d8f87c](https://github.com/gohugoio/hugo/commit/c2d8f87cfc1c4ae666fbb1fb5b8983d43492333f) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/google/go-cmp from 0.5.4 to 0.5.5 [cbc24661](https://github.com/gohugoio/hugo/commit/cbc246616e88729322dad70971eae18ef59dd5d4) [@dependabot[bot]](https://github.com/apps/dependabot)
* Disable broken pretty relative links feature [fa432b17](https://github.com/gohugoio/hugo/commit/fa432b17b349ed7e914af3625187e2c1dc2e243b) [@niklasfasching](https://github.com/niklasfasching)
* Update go-org to v1.5.0 [0cd55c66](https://github.com/gohugoio/hugo/commit/0cd55c66d370559b66eea220626c4842efaf7039) [@niklasfasching](https://github.com/niklasfasching)
* bump github.com/jdkato/prose from 1.2.0 to 1.2.1 [0d5cf256](https://github.com/gohugoio/hugo/commit/0d5cf256e4f2a5babcbcf7b49a6818869c3c0691) [@dependabot[bot]](https://github.com/apps/dependabot)
* bump github.com/spf13/cobra from 1.1.1 to 1.1.3 [36527576](https://github.com/gohugoio/hugo/commit/36527576b30224dff2eae7f6c9f27eff807d5402) [@dependabot[bot]](https://github.com/apps/dependabot)
* Add complete dependency list in "hugo env -v" [9b83f45b](https://github.com/gohugoio/hugo/commit/9b83f45b6dcafa6e50df80a4786d6a36400a47fe) [@bep](https://github.com/bep) [#8400](https://github.com/gohugoio/hugo/issues/8400)
* Add hugo.IsExtended [7fdd2b95](https://github.com/gohugoio/hugo/commit/7fdd2b95e20f322b0a47f63ff1010a04f47ce67b) [@bep](https://github.com/bep) [#8399](https://github.com/gohugoio/hugo/issues/8399)
* Also test minified HTML in the element collector [3d5dbdcb](https://github.com/gohugoio/hugo/commit/3d5dbdcb1a11b059fc2f93ed6fadb9009bf72673) [@bep](https://github.com/bep) [#7567](https://github.com/gohugoio/hugo/issues/7567)
* Skip script, pre and textarea content when looking for HTML elements [8a308944](https://github.com/gohugoio/hugo/commit/8a308944e46f8c2aa054005d5aed89f2711f9c1d) [@bep](https://github.com/bep) [#7567](https://github.com/gohugoio/hugo/issues/7567)
* Add slice syntax to sections permalinks config [2dc222ce](https://github.com/gohugoio/hugo/commit/2dc222cec4460595af8569165d1c498bb45aac84) [@bep](https://github.com/bep) [#8363](https://github.com/gohugoio/hugo/issues/8363)
* Upgrade github.com/evanw/esbuild v0.9.6 => v0.11.0 [4d22ad58](https://github.com/gohugoio/hugo/commit/4d22ad580ec8c8e5e27cf4f5cce69b6828aa8501) [@bep](https://github.com/bep)
## Fixes
### Templates
* Fix where on type mismatches [e4dc9a82](https://github.com/gohugoio/hugo/commit/e4dc9a82b557a417b1552c533b0df605c6ff1cc0) [@bep](https://github.com/bep) [#8353](https://github.com/gohugoio/hugo/issues/8353)
### Output
* Regression in media type suffix lookup [6e9d2bf0](https://github.com/gohugoio/hugo/commit/6e9d2bf0c936900f8f676d485098755b3f463373) [@bep](https://github.com/bep) [#8406](https://github.com/gohugoio/hugo/issues/8406)
* Regression in media type suffix lookup [e73f7a77](https://github.com/gohugoio/hugo/commit/e73f7a770dfb06f23d842d589bdd3d0fb53c7eed) [@bep](https://github.com/bep) [#8406](https://github.com/gohugoio/hugo/issues/8406)
### Other
* Fix multiple unknown language codes [7eb80a9e](https://github.com/gohugoio/hugo/commit/7eb80a9e6fcb6d31711effa20310cfefb7b23c1b) [@bep](https://github.com/bep) [#7838](https://github.com/gohugoio/hugo/issues/7838)
* Fix permalinks pattern detection for some of the sections variants [c13d3687](https://github.com/gohugoio/hugo/commit/c13d368746992eb39a33f065ca808e129baec4ef) [@bep](https://github.com/bep) [#8363](https://github.com/gohugoio/hugo/issues/8363)
* Fix Params case handling in where with slices of structs (e.g. Pages) [bca40cf0](https://github.com/gohugoio/hugo/commit/bca40cf0c9c7b75e6d5b4a9ac8b927eb17590c7e) [@bep](https://github.com/bep) [#7009](https://github.com/gohugoio/hugo/issues/7009)
* Fix typo in docshelper.go [7c7974b7](https://github.com/gohugoio/hugo/commit/7c7974b711879938eafc08a2ce242d0f00c8e9e6) [@jmooring](https://github.com/jmooring) [#8380](https://github.com/gohugoio/hugo/issues/8380)
* Try to fix the fuzz build [5e2f1289](https://github.com/gohugoio/hugo/commit/5e2f1289118dc1489fb782bf289298a05104eeaf) [@bep](https://github.com/bep)

View file

@ -0,0 +1,19 @@
---
date: 2021-05-02
title: "Hugo 0.83.1: One Bug Fix"
description: "This version fixes an issue introduced in 0.83.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix release with one important fix.
* langs/i18n: Fix warning regression in i18n [ececd1b1](https://github.com/gohugoio/hugo/commit/ececd1b122c741567a80acd8d60ccd6356fa5323) [@bep](https://github.com/bep) [#8492](https://github.com/gohugoio/hugo/issues/8492)

View file

@ -27,9 +27,7 @@ the current _list_ page:
current _list_ page. This **excludes** regular pages in nested sections/_list_ pages (those are subdirectories with an `_index.md` file.
`.RegularPagesRecursive`
: Collection of **all** _regular_ pages under a _list_ page. This **includes** regular pages in nested sections/_list_ pages.
This feature was added in Hugo version 0.68.0
: {{< new-in "0.68.0" >}} Collection of **all** _regular_ pages under a _list_ page. This **includes** regular pages in nested sections/_list_ pages.
Note
: From the scope of _regular_ pages, `.Pages` and

View file

@ -68,6 +68,22 @@ Accessing the Page Parameter `bar` defined in a piece of content's [front matter
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
```
#### A Single Statement Can be Split over Multiple Lines
```go-html-template
{{ if or
(isset .Params "alt")
(isset .Params "caption")
}}
```
#### Raw String Literals Can Include Newlines
```go-html-template
{{ $msg := `Line one.
Line two.` }}
```
## Variables {#variables}
Each Go Template gets a data object. In Hugo, each template is passed

View file

@ -44,7 +44,7 @@ Section
: Is relevant for `section`, `taxonomy` and `term` types.
{{% note %}}
**Tip:** The examples below looks long and complex. That is the flexibility talking. Most Hugo sites contain just a handful of templates:
**Tip:** The examples below look long and complex. That is the flexibility talking. Most Hugo sites contain just a handful of templates:
```bash
├── _default

View file

@ -82,7 +82,7 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables.
: the meta keywords for the content.
.Kind
: the page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `taxonomyTerm`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
: the page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `term`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
.Language
: a language object that points to the language's definition in the site `config`. `.Language.Lang` gives you the language code.
@ -204,7 +204,7 @@ aliased form `.Pages`.
### `.Pages` compared to `.Site.Pages`
{{< readfile file="/content/en/readfiles/pages-vs-site-pages.md" markdown="true" >}}
{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}
## Page-level Params

View file

@ -96,7 +96,7 @@ All the methods below, e.g. `.Site.RegularPages` can also be reached via the glo
: top-level directories of the site.
.Site.Taxonomies
: the [taxonomies](/taxonomies/usage/) for the entire site. Also see section [Taxonomies elsewhere](#taxonomies-elsewhere).
: the [taxonomies](/taxonomies/usage/) for the entire site. Also see section [Use `.Site.Taxonomies` Outside of Taxonomy Templates](/variables/taxonomy/#use-sitetaxonomies-outside-of-taxonomy-templates).
.Site.Title
: a string representing the title of the site.
@ -127,7 +127,7 @@ You can use `.Site.Params` in a [partial template](/templates/partials/) to call
### `.Site.Pages` compared to `.Pages`
{{< readfile file="/content/en/readfiles/pages-vs-site-pages.md" markdown="true" >}}
{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}

View file

@ -14,6 +14,13 @@
"abnf"
]
},
{
"Name": "AL",
"Aliases": [
"al",
"dal"
]
},
{
"Name": "ANTLR",
"Aliases": [
@ -369,6 +376,14 @@
"dockerfile"
]
},
{
"Name": "Dylan",
"Aliases": [
"dyl",
"dylan",
"intr"
]
},
{
"Name": "EBNF",
"Aliases": [
@ -579,7 +594,8 @@
{
"Name": "Handlebars",
"Aliases": [
"handlebars"
"handlebars",
"hbs"
]
},
{
@ -666,7 +682,8 @@
"Aliases": [
"javascript",
"js",
"jsm"
"jsm",
"mjs"
]
},
{
@ -963,6 +980,7 @@
"posh",
"powershell",
"ps1",
"psd1",
"psm1"
]
},
@ -1022,6 +1040,13 @@
"qbasic"
]
},
{
"Name": "QML",
"Aliases": [
"qbs",
"qml"
]
},
{
"Name": "R",
"Aliases": [
@ -1424,6 +1449,12 @@
"mkd"
]
},
{
"Name": "mcfunction",
"Aliases": [
"mcfunction"
]
},
{
"Name": "plaintext",
"Aliases": [
@ -1752,6 +1783,20 @@
"svg"
]
},
{
"mainType": "image",
"subType": "webp",
"delimiter": ".",
"firstSuffix": {
"suffix": "webp",
"fullSuffix": ".webp"
},
"type": "image/webp",
"string": "image/webp",
"suffixes": [
"webp"
]
},
{
"mainType": "text",
"subType": "calendar",
@ -3467,6 +3512,12 @@
"Aliases": null,
"Examples": null
},
"IsExtended": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
},
"IsProduction": {
"Description": "",
"Args": null,

820
hugo_stats.json Normal file
View file

@ -0,0 +1,820 @@
{
"htmlElements": {
"tags": [
"",
"a",
"article",
"aside",
"blockquote",
"body",
"br",
"button",
"circle",
"code",
"date",
"dd",
"div",
"dl",
"dt",
"em",
"figcaption",
"figure",
"footer",
"form",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hr",
"html",
"i",
"iframe",
"img",
"li",
"link",
"main",
"meta",
"nav",
"noscript",
"ol",
"p",
"path",
"pre",
"script",
"section",
"small",
"span",
"strong",
"style",
"sup",
"svg",
"table",
"tbody",
"td",
"thead",
"time",
"title",
"tr",
"ul"
],
"classes": [
"!('about'",
"!('content-management'",
"!('contribute'",
"!('functions'",
"!('getting-started'",
"!('hosting-and-deployment'",
"!('modules'",
"!('pipes'",
"!('templates'",
"!('tools'",
"!('troubleshooting'",
"!('variables'",
"\u0026\u0026",
"(false",
"(true",
"-ml-px",
"-mr-12",
"-mr-3",
"-translate-x-3",
"-translate-y-2",
"absolute",
"absolute-l",
"active",
"admonition",
"admonition-content",
"admonition-icon",
"anchor",
"b--moon-gray",
"benchstat",
"better",
"bg-accent-color-dark",
"bg-animate",
"bg-black",
"bg-carrot-500",
"bg-cover",
"bg-gradient-to-b",
"bg-gray-100",
"bg-gray-200",
"bg-gray-300",
"bg-gray-50",
"bg-gray-600",
"bg-gray-900",
"bg-green-100",
"bg-mango-300",
"bg-mango-50",
"bg-near-white",
"bg-opacity-20",
"bg-opacity-75",
"bg-orange-500",
"bg-steel-200",
"bg-steel-500",
"bg-steel-600",
"bg-steel-800",
"bg-steel-900",
"bg-white",
"blTK",
"black",
"block",
"bmt1",
"border",
"border-0",
"border-2",
"border-b",
"border-gray-100",
"border-gray-200",
"border-gray-300",
"border-l",
"border-none",
"border-r",
"border-solid",
"border-t",
"border-transparent",
"bottom-0",
"break-inside-avoid-l",
"btn-primary",
"c",
"c1",
"chroma",
"clearfix",
"cm",
"code-copy-content",
"code-toggle",
"column-count-3-l",
"column-gap-1-l",
"configs",
"copy",
"cp",
"cursor-pointer",
"dark:bg-red-800",
"dark:border-gray-800",
"delta",
"details",
"dim",
"disabled",
"divide-gray-200",
"divide-x",
"err",
"f2-fluid",
"f6",
"filename",
"fill-current",
"fixed",
"fixed-lTK",
"flex",
"flex-1",
"flex-auto",
"flex-auto-ns",
"flex-col",
"flex-column",
"flex-none",
"flex-shrink-0",
"flex-wrap",
"fn",
"focus:border-steel-500",
"focus:outline-none",
"focus:ring-1",
"focus:ring-2",
"focus:ring-inset",
"focus:ring-offset-2",
"focus:ring-steel-500",
"focus:ring-white",
"focus:z-10",
"font-black",
"font-bold",
"font-extrabold",
"font-extralight",
"font-medium",
"font-mono",
"font-normal",
"font-sans",
"font-semibold",
"footnote-backref",
"footnote-ref",
"footnotes",
"from-primarydark",
"gap-4",
"ge",
"grid",
"grid-cols-1",
"group",
"grow",
"gs",
"gu",
"h-0",
"h-0.5",
"h-10",
"h-12",
"h-16",
"h-2",
"h-32",
"h-5",
"h-6",
"h-64",
"h-8",
"h-full",
"h-screen",
"h6",
"hidden",
"highlight",
"hl",
"hover",
"hover-bg-green",
"hover-bg-near-white",
"hover-bg-primary-color",
"hover-bg-primary-color-dark",
"hover-blue",
"hover:bg-gray-300",
"hover:bg-gray-50",
"hover:bg-steel-500",
"hover:bg-steel-700",
"hover:border",
"hover:text-gray-200",
"hover:text-gray-900",
"hover:text-hotpink-400",
"hover:text-hotpink-600",
"hover:text-limegreen-900",
"hover:text-royalblue-700",
"hover:text-steel-500",
"hover:text-white",
"img",
"in",
"inline-block",
"inline-flex",
"inset-0",
"inset-x-0",
"instagram-media",
"items-center",
"items-start",
"justify-between",
"justify-center",
"justify-end",
"k",
"kc",
"kd",
"kr",
"kt",
"l",
"language-asciidoc",
"language-bash",
"language-go",
"language-go-html-template",
"language-go-text-template",
"language-html",
"language-js",
"language-json",
"language-markdown",
"language-md",
"language-ps1",
"language-sh",
"language-svg",
"language-text",
"language-toml",
"language-txt",
"language-xml",
"language-yaml",
"language-yml",
"lazyload",
"ld",
"lead",
"leading-none",
"leading-normal",
"leading-relaxed",
"leading-snug",
"leading-tight",
"left-0",
"lg:bg-steel-700",
"lg:block",
"lg:flex",
"lg:flex-grow",
"lg:flex-shrink-0",
"lg:hidden",
"lg:inline-block",
"lg:items-center",
"lg:max-w-lg",
"lg:mb-0",
"lg:mr-auto",
"lg:mt-0",
"lg:p-4",
"lg:pb-5",
"lg:prose-lg",
"lg:pt-0",
"lg:px-4",
"lg:px-5",
"lg:px-8",
"lg:py-5",
"lg:py-8",
"lg:rounded-md",
"lg:shadow-lg",
"lg:space-x-4",
"lg:text-5xl",
"lg:w-1/2",
"lg:w-1/4",
"lg:w-1/5",
"lg:w-11/12",
"lg:w-3/5",
"lg:w-4/5",
"lg:w-auto",
"light-gray",
"link",
"list-reset",
"lnt",
"lntable",
"lntd",
"m",
"m-0",
"m-1",
"max-w-6xl",
"max-w-lg",
"max-w-xs",
"mb-0",
"mb-1",
"mb-2",
"mb-3",
"mb-4",
"mb-8",
"mb5",
"mb7",
"md:flex",
"md:flex-col",
"md:flex-grow",
"md:grid-cols-2",
"md:mt-8",
"md:pb-12",
"menu))",
"menu['about']",
"menu['content-management']",
"menu['contribute']",
"menu['functions']",
"menu['getting-started']",
"menu['hosting-and-deployment']",
"menu['modules']",
"menu['pipes']",
"menu['templates']",
"menu['tools']",
"menu['troubleshooting']",
"menu['variables']",
"mf",
"mi",
"min-h-screen",
"min-w-0",
"minor",
"ml-1",
"ml-10",
"ml-4",
"ml-6",
"ml1",
"mr-1.5",
"mr-10",
"mr-3",
"mr-4",
"mt-0",
"mt-1",
"mt-2",
"mt-4",
"mt-5",
"mt-6",
"mt-8",
"mt3",
"mt4",
"mv2",
"mv3",
"mv4",
"mv6",
"mw-100",
"mw5-l",
"mx-auto",
"my-0",
"n",
"na",
"navbar-menu",
"nb",
"needs-js",
"nested-blockquote",
"nested-copy-seperator",
"nested-img",
"nested-links",
"nested-linksTK",
"nested-list-reset",
"nf",
"ni",
"nightwind",
"nightwind-prevent",
"nightwind-prevent-block",
"nn",
"no-js",
"no-underline",
"nodelta",
"note",
"note-icon",
"nt",
"nt3",
"nv",
"nx",
"o",
"o-0",
"o-80",
"oldnew",
"opacity-60",
"open",
"order-0",
"order-0-l",
"order-1",
"order-1-l",
"order-2",
"output-content",
"overflow-hidden",
"overflow-x-scroll",
"overflow-y-auto",
"p",
"p-0",
"p-2",
"p-3",
"p-4",
"p-5",
"p-8",
"pa4-m",
"page-item",
"page-link",
"pagination",
"pb-1",
"pb-2",
"pb-3",
"pb-4",
"pb-5",
"pb-7",
"pb-8",
"pb2",
"ph1",
"ph2",
"ph4",
"pl-0",
"pl-1",
"pl-2",
"pl-3",
"pl-6",
"pl5-l",
"pr-2",
"pr1",
"primary-color",
"prose",
"pt-0",
"pt-1",
"pt-2",
"pt-3",
"pt-4",
"pt-5",
"pv1",
"px-0",
"px-2",
"px-3",
"px-4",
"py-0",
"py-0.5",
"py-1.5",
"py-2",
"py-3",
"py-4",
"py-6",
"relative",
"right-0",
"rounded",
"rounded-full",
"rounded-l-lg",
"rounded-l-md",
"rounded-lg",
"rounded-md",
"rounded-r-md",
"row",
"s",
"s1",
"s2",
"san-serif",
"se",
"shadow",
"shadow-lg",
"shadow-md",
"shadow-sm",
"show",
"sm:flex",
"sm:grid-cols-2",
"sm:mb-0",
"sm:mt-0",
"sm:mt-8",
"sm:p-4",
"sm:pb-0",
"sm:pb-6",
"sm:pt-3",
"sm:pt-5",
"sm:px-4",
"sm:px-5",
"sm:px-6",
"sm:py-0",
"sm:py-4",
"sm:py-5",
"sm:py-6",
"sm:text-2xl",
"sm:text-4xl",
"sm:text-base",
"sm:text-center",
"sm:text-left",
"sm:w-1/2",
"sm:w-1/5",
"sm:w-11/12",
"sm:w-4/5",
"space-x-4",
"space-x-8",
"space-y-1",
"sr-only",
"table",
"table-bordered",
"tc",
"text-2xl",
"text-3xl",
"text-4xl",
"text-5xl",
"text-base",
"text-black",
"text-center",
"text-gray-200",
"text-gray-300",
"text-gray-400",
"text-gray-500",
"text-gray-600",
"text-gray-900",
"text-lg",
"text-limegreen-600",
"text-limegreen-700",
"text-mango-100",
"text-mango-300",
"text-md",
"text-royalblue-500",
"text-royalblue-600",
"text-sm",
"text-steel-100",
"text-steel-500",
"text-steel-900",
"text-white",
"text-xl",
"text-xs",
"tile",
"tip",
"tip-icon",
"to-steel-800",
"top-0",
"top-2",
"tracked",
"tracking-normal",
"tracking-tight",
"transform",
"twitter-tweet",
"unchanged",
"uppercase",
"v-base",
"v-mid",
"v-top",
"w",
"w-1/5",
"w-10",
"w-11/12",
"w-12",
"w-14",
"w-2",
"w-2/3",
"w-30-l",
"w-32",
"w-5",
"w-50-m",
"w-6",
"w-64",
"w-8",
"w-80-nsTK",
"w-96",
"w-auto",
"w-full",
"w-two-third-l",
"warning",
"whitespace-no-wrap",
"worse",
"x",
"xl:flex",
"xl:flex-col",
"z-0",
"z-40",
"z-999",
"||"
],
"ids": [
".gitlab-ci.yml",
"/blog/greatest-city/index.html",
"/content/actors/bruce-willis/_index.md",
"/layouts/shortcodes/img.html",
"/layouts/shortcodes/vimeo.html",
"/layouts/shortcodes/year.html",
"/layouts/shortcodes/youtube.html",
"/themes/yourtheme/layouts/review/single.html",
"404.html",
"TableOfContents",
"addrobotstxt.sh",
"all-taxonomies-keys-and-pages.html",
"all-taxonomies.html",
"archetype-example.sh",
"archetypes/functions.md",
"archetypes/newsletter.md",
"articles.html",
"asciicast-3mf1JGaN0AX0Z7j5kLGl3hSh8",
"asciicast-7naKerRYUGVPj8kiDmdh5k5h9",
"asciicast-BvJBsF6egk9c163bMsObhuNXj",
"asciicast-ItACREbFgvJ0HjnSNeTknxWy9",
"asciicast-Lc5iwTVny2kuUC8lqvNnL6oDU",
"asciicast-eUojYCfRTZvkEiqc52fUsJRBR",
"bad-url-sidebar-menu-output.html",
"base-64-output.html",
"base64-input.html",
"baseof.html",
"bf-config.toml",
"bf-config.yml",
"boxfile.yml",
"breadcrumb.html",
"check-title-length.html",
"clone-herring-cove-theme.sh",
"config.toml",
"content-header.html",
"content-image.md",
"content/blog/greatest-city.md",
"content/posts/_index.md",
"content/posts/default-function-example.md",
"content/posts/my-awesome-post.md",
"content/posts/my-post.md",
"content/posts/old-post.md",
"content/posts/old-url.md",
"content/tutorials/learn-html.md",
"correct-url-sidebar-menu-output.html",
"delimit-example-front-matter.toml",
"delimit-page-tags-final-and-input.html",
"delimit-page-tags-final-and-output.html",
"delimit-page-tags-input.html",
"delimit-page-tags-output.html",
"disqus.html",
"dot-notation-default-return-value.html",
"dot-notation-default-value.html",
"example-tweet-input.md",
"example-tweet-output.html",
"example-vimeo-input.md",
"example-vimeo-output.html",
"example-youtube-input-with-autoplay.md",
"example-youtube-input-with-title.md",
"example-youtube-input.md",
"example-youtube-output.html",
"example.com/posts/index.html",
"example.com/quote/index.html",
"external-links.svg",
"figure-input-example.md",
"figure-output-example.html",
"first-and-where-together.html",
"fn:1",
"fn:2",
"fnref:1",
"fnref:2",
"footer.html",
"from-gh.sh",
"gist-input.md",
"gist-output.html",
"gitignore.sh",
"gohugoio",
"grab-top-two-tags.html",
"header.html",
"highlight-example.md",
"how-many-posts.html",
"hugo-new-site.sh",
"if-instead-of-default.html",
"img-output.html",
"index.html",
"instagram-hide-caption-output.html",
"instagram-input-hide-caption.md",
"instagram-input.md",
"install-brew.sh",
"install-extended-with-chocolatey.ps1",
"install-go.sh",
"install-openssh.sh",
"install-with-chocolatey.ps1",
"install-with-homebrew.sh",
"install-with-linuxbrew.sh",
"install-with-macports.sh",
"install.sh",
"layout/_default/section.html",
"layout/_default/single.html",
"layouts/404.html",
"layouts/_default/_markup/render-heading.html",
"layouts/_default/_markup/render-image.html",
"layouts/_default/_markup/render-link.html",
"layouts/_default/baseof.html",
"layouts/_default/li.html",
"layouts/_default/list.html",
"layouts/_default/section.html",
"layouts/_default/single.html",
"layouts/_default/summary.html",
"layouts/_default/taxonomy.html",
"layouts/index.html",
"layouts/partials/all-taxonomies.html",
"layouts/partials/alllanguages.html",
"layouts/partials/bad-url-sidebar-menu.html",
"layouts/partials/breadcrumb.html",
"layouts/partials/by-date-reverse.html",
"layouts/partials/by-date.html",
"layouts/partials/by-expiry-date.html",
"layouts/partials/by-group-by-page.html",
"layouts/partials/by-last-mod.html",
"layouts/partials/by-length.html",
"layouts/partials/by-link-title.html",
"layouts/partials/by-nested-param.html",
"layouts/partials/by-page-date.html",
"layouts/partials/by-page-expiry-date.html",
"layouts/partials/by-page-field.html",
"layouts/partials/by-page-lastmod.html",
"layouts/partials/by-page-param-as-date.html",
"layouts/partials/by-page-param.html",
"layouts/partials/by-page-publish-date.html",
"layouts/partials/by-publish-date.html",
"layouts/partials/by-rating.html",
"layouts/partials/by-title.html",
"layouts/partials/by-weight.html",
"layouts/partials/content-header.html",
"layouts/partials/correct-url-sidebar-menu.html",
"layouts/partials/default-order.html",
"layouts/partials/disqus.html",
"layouts/partials/footer.html",
"layouts/partials/get-csv.html",
"layouts/partials/groups.html",
"layouts/partials/head.html",
"layouts/partials/header.html",
"layouts/partials/i18nlist.html",
"layouts/partials/post-tag-link.html",
"layouts/partials/post-tag-list.html",
"layouts/partials/related.html",
"layouts/partials/schemaorg-metadata.html",
"layouts/partials/sidebar.html",
"layouts/partials/svgs/external-links.svg",
"layouts/partials/toc.html",
"layouts/partials/twitter.html",
"layouts/partials/upcoming-events.html",
"layouts/posts/single.html",
"layouts/robots.txt",
"layouts/section/articles.html",
"layouts/section/posts.html",
"layouts/shortcodes/gallery.html",
"layouts/shortcodes/img.html",
"layouts/shortcodes/imgproc.html",
"li.html",
"links-to-all-tags.html",
"list.html",
"netlify.toml",
"note-with-heading.html",
"note-with-heading.md",
"page-list-with-summaries.html",
"partial-cached-example.html",
"partials/templates/random-tweets.html",
"post-tag-list.html",
"prose",
"push-wecker-to-gh.sh",
"range-through-tags-w-global.html",
"remove-herring-cove-git.sh",
"robots.txt",
"schemaorg-metadata.html",
"section.html",
"setup-gh-repo.sh",
"shuffle-input.html",
"shuffle-output.html",
"sidebar.html",
"single.html",
"slice.html",
"summary.html",
"syntax-highlighted.html",
"tags-range-with-page-variable.html",
"taxonomy.html",
"time-passed.html",
"tip-output.html",
"toc.html",
"tutorials/learn-html/index.html",
"tweets.html",
"unix-to-month-integer.html",
"upcoming-events.html",
"using-tip.md",
"variable-as-default-value.html",
"vimeo-iframes.html",
"warning-admonition-input.md",
"warning-admonition-output.html",
"wercker-build-step.yml",
"wercker.yml",
"where-intersect-variables.html",
"with-instead-of-default.html",
"yourbaseurl/review/book01/index.html",
"youtube-embed.html"
]
}
}

View file

@ -0,0 +1,21 @@
<!-- {{/*
Insert `.Content` from a (headless) bundle. You can insert `.Content` from multiple page resources of the same bundle by specifying `glob`.
Usage: {{< getcontent path="PATH/TO/FILE" >}}
{{< getcontent path="PATH/TO/BUNDLE/" glob="*_PATTERN.md" >}}
*/}} -->
{{- $path := .Get "path" -}}
{{ $glob := .Get "glob" -}}
{{ $resources := slice -}}
{{ with $glob -}}
{{ $bundle := site.GetPage $path -}}
{{ $resources = $bundle.Resources.Match $glob -}}
{{ else -}}
{{ $bundle := site.GetPage (path.Dir $path) -}}
{{ $resources = $bundle.Resources.Match (path.Base $path) -}}
{{ end -}}
{{ range $resources -}}
{{ .Content }}
{{ end -}}

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB