diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md
index 63312a054..c2e3cfa66 100644
--- a/content/en/content-management/multilingual.md
+++ b/content/en/content-management/multilingual.md
@@ -344,7 +344,7 @@ The function will read `.Count` from `.ReadingTime` and evaluate whether the num
{{< code-toggle file="i18n/en-US" >}}
[readingTime]
one = "One minute to read"
-other = "{{.Count }} minutes to read"
+other = "{{ .Count }} minutes to read"
{{< /code-toggle >}}
Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be:
diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md
index 0697ab8ea..b59be8163 100644
--- a/content/en/content-management/shortcodes.md
+++ b/content/en/content-management/shortcodes.md
@@ -185,7 +185,7 @@ This shortcode will convert the source code provided into syntax-highlighted HTM
{{ .Title }}
{{ range .Pages }}
- {{ .Render "summary"}}
+ {{ .Render "summary" }}
{{ end }}
diff --git a/content/en/content-management/toc.md b/content/en/content-management/toc.md
index 0bf3a7c70..aa1e74622 100644
--- a/content/en/content-management/toc.md
+++ b/content/en/content-management/toc.md
@@ -14,7 +14,7 @@ aliases: [/extras/toc/]
{{% note "TOC Heading Levels are Fixed" %}}
-Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `` was going to start at `
` when pulling from `{{.Content }}`.
+Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `` was going to start at `
` when pulling from `{{ .Content }}`.
Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer.
@@ -72,15 +72,15 @@ The following is a [partial template][partials] that adds slightly more logic fo
{{ if and (gt .WordCount 400 ) (.Params.toc) }}
{{ end }}
{{< /code >}}
{{% note %}}
-With the preceding example, even pages with > 400 words *and* `toc` not set to `false` will not render a table of contents if there are no headings in the page for the `{{.TableOfContents }}` variable to pull from.
+With the preceding example, even pages with > 400 words *and* `toc` not set to `false` will not render a table of contents if there are no headings in the page for the `{{ .TableOfContents }}` variable to pull from.
{{% /note %}}
## Usage with AsciiDoc
diff --git a/content/en/contribute/documentation.md b/content/en/contribute/documentation.md
index a72483dc0..259765190 100644
--- a/content/en/contribute/documentation.md
+++ b/content/en/contribute/documentation.md
@@ -72,7 +72,7 @@ Here is a review of the front matter fields automatically generated for you usin
`relatedfuncs`
: other [templating functions] you feel are related to your new function to help fellow Hugo users.
-`{{.Content }}`
+`{{ .Content }}`
: an extended description of the new function; examples are not only welcomed but encouraged.
In the body of your function, expand the short description used in the front matter. Include as many examples as possible, and leverage the Hugo docs [`code` shortcode](#add-code-blocks).
@@ -136,15 +136,15 @@ This example HTML code block tells Hugo users the following:
-
{{.Title }}
+
{{ .Title }}
{{ with .Params.subtitle }}
- {{.}}
+ {{ . }}
- {{.Content }}
+ {{ .Content }}
@@ -161,15 +161,15 @@ The output of this example will render to the Hugo docs as follows:
-
{{.Title }}
+
{{ .Title }}
{{ with .Params.subtitle }}
- {{.}}
+ {{ . }}
- {{.Content }}
+ {{ .Content }}
diff --git a/content/en/functions/after.md b/content/en/functions/after.md
index f182d913b..810d969b6 100644
--- a/content/en/functions/after.md
+++ b/content/en/functions/after.md
@@ -30,24 +30,24 @@ You can use `after` in combination with the [`first` function] and Hugo's [power
{{< code file="layouts/section/articles.html" download="articles.html" >}}
{{ define "main" }}
-
Featured Article
- {{ range first 1 .Pages.ByPublishDate.Reverse }}
-
-
{{ end }}
{{< /code >}}
diff --git a/content/en/functions/chomp.md b/content/en/functions/chomp.md
index d8f8bfe4f..861e7ecc4 100644
--- a/content/en/functions/chomp.md
+++ b/content/en/functions/chomp.md
@@ -16,5 +16,5 @@ relatedfuncs: [truncate]
Useful in a pipeline to remove newlines added by other processing (e.g., [`markdownify`](/functions/markdownify/)).
```go-html-template
-{{ chomp "
Blockhead
\n"}} → "
Blockhead
"
+{{ chomp "
Blockhead
\n" }} → "
Blockhead
"
```
diff --git a/content/en/functions/default.md b/content/en/functions/default.md
index a8bac86dd..800d4c824 100644
--- a/content/en/functions/default.md
+++ b/content/en/functions/default.md
@@ -71,13 +71,13 @@ The following have equivalent return values but are far less terse. This demonst
Using `if`:
{{< code file="if-instead-of-default.html" copy="false" >}}
-{{ if .Params.seo_title }}{{.Params.seo_title }}{{ else }}{{.Title }}{{ end }}
+{{ if .Params.seo_title }}{{ .Params.seo_title }}{{ else }}{{ .Title }}{{ end }}
=> Sane Defaults
{{< /code >}}
Using `with`:
{{< code file="with-instead-of-default.html" copy="false" >}}
-{{ with .Params.seo_title }}{{.}}{{ else }}{{.Title }}{{ end }}
+{{ with .Params.seo_title }}{{ . }}{{ else }}{{ .Title }}{{ end }}
=> Sane Defaults
{{< /code >}}
diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md
index c7326242f..9da434653 100644
--- a/content/en/functions/hugo.md
+++ b/content/en/functions/hugo.md
@@ -89,7 +89,7 @@ An example table listing the dependencies:
{{ range $index, $element := hugo.Deps }}
{{ add $index 1 }}
-
{{ with $element.Owner }}{{.Path }}{{ end }}
+
{{ with $element.Owner }}{{ .Path }}{{ end }}
{{ $element.Path }}
{{ with $element.Replace }}
diff --git a/content/en/functions/humanize.md b/content/en/functions/humanize.md
index b6e2b8e2a..6cbd85837 100644
--- a/content/en/functions/humanize.md
+++ b/content/en/functions/humanize.md
@@ -14,8 +14,8 @@ If the input is either an int64 value or the string representation of an integer
```go-html-template
-{{ humanize "my-first-post"}} → "My first post"
-{{ humanize "myCamelPost"}} → "My camel post"
-{{ humanize "52"}} → "52nd"
+{{ humanize "my-first-post" }} → "My first post"
+{{ humanize "myCamelPost" }} → "My camel post"
+{{ humanize "52" }} → "52nd"
{{ humanize 103 }} → "103rd"
```
diff --git a/content/en/functions/images/index.md b/content/en/functions/images/index.md
index 4e16ef965..9cd772e5b 100644
--- a/content/en/functions/images/index.md
+++ b/content/en/functions/images/index.md
@@ -45,7 +45,7 @@ images.Text TEXT DICT)
The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.
```go-html-template
-{{ $img := resources.Get "/images/background.png"}}
+{{ $img := resources.Get "/images/background.png" }}
{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"color" "#ffffff"
"size" 60
@@ -60,7 +60,7 @@ You can load a custom font if needed. Load the font as a Hugo `Resource` and set
```go-html-template
{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }}
-{{ $img := resources.Get "/images/background.png"}}
+{{ $img := resources.Get "/images/background.png" }}
{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"font" $font
))}}
@@ -221,6 +221,6 @@ images.ImageConfig PATH
```go-html-template
{{ with (imageConfig "favicon.ico") }}
-favicon.ico: {{.Width }} x {{.Height }}
+favicon.ico: {{ .Width }} x {{ .Height }}
{{ end }}
```
diff --git a/content/en/functions/isset.md b/content/en/functions/isset.md
index bbedcd4bb..ea0abf1e5 100644
--- a/content/en/functions/isset.md
+++ b/content/en/functions/isset.md
@@ -17,6 +17,6 @@ Takes either a slice, array, or channel and an index or a map and a key as input
```
{{% warning %}}
-All site-level configuration keys are stored as lower case. Therefore, a `myParam` key-value set in your [site configuration file](/getting-started/configuration/) needs to be accessed with `{{ if isset .Site.Params "myparam"}}` and *not* with `{{ if isset .Site.Params "myParam"}}`. Note that you can still access the same config key with `.Site.Params.myParam` *or* `.Site.Params.myparam`, for example, when using [`with`](/functions/with).
+All site-level configuration keys are stored as lower case. Therefore, a `myParam` key-value set in your [site configuration file](/getting-started/configuration/) needs to be accessed with `{{ if isset .Site.Params "myparam" }}` and *not* with `{{ if isset .Site.Params "myParam" }}`. Note that you can still access the same config key with `.Site.Params.myParam` *or* `.Site.Params.myparam`, for example, when using [`with`](/functions/with).
This restriction also applies when accessing page-level front matter keys from within [shortcodes](/content-management/shortcodes/).
{{% /warning %}}
diff --git a/content/en/functions/len.md b/content/en/functions/len.md
index f621f8c90..9a57fb9b8 100644
--- a/content/en/functions/len.md
+++ b/content/en/functions/len.md
@@ -30,7 +30,7 @@ You may want to append a class to a heading according to the length of the strin
{{< code file="check-title-length.html" >}}
-
{{.Title }}
+
{{ .Title }}
{{< /code >}}
diff --git a/content/en/functions/now.md b/content/en/functions/now.md
index 47afdc64d..68d628f11 100644
--- a/content/en/functions/now.md
+++ b/content/en/functions/now.md
@@ -16,7 +16,7 @@ For example, building your site on June 24, 2017, with the following templating:
```go-html-template
{{ end }}
{{ with .Params.tags }}
diff --git a/content/en/functions/where.md b/content/en/functions/where.md
index b05e21cc0..49882b807 100644
--- a/content/en/functions/where.md
+++ b/content/en/functions/where.md
@@ -77,7 +77,7 @@ The following logical operators are available with `where`:
When using booleans you should not put quotation marks.
```go-html-template
{{ range where .Pages "Draft" true }}
-
{{.Title }}
+
{{ .Title }}
{{ end }}
```
diff --git a/content/en/functions/with.md b/content/en/functions/with.md
index 24707457a..591aea01e 100644
--- a/content/en/functions/with.md
+++ b/content/en/functions/with.md
@@ -20,8 +20,8 @@ The following example checks for a [user-defined site variable](/variables/site/
{{< code file="layouts/partials/twitter.html" >}}
{{ with .Site.Params.twitteruser }}
-
-
+{{ end }}
{{< /code >}}
diff --git a/content/en/news/0.59.0-relnotes/index.md b/content/en/news/0.59.0-relnotes/index.md
index d122e4c44..98fe5d088 100644
--- a/content/en/news/0.59.0-relnotes/index.md
+++ b/content/en/news/0.59.0-relnotes/index.md
@@ -19,13 +19,13 @@ See [Image Processing Options](https://gohugo.io/content-management/image-proces
Another useful addon is the `$pages.Next` and `$pages.Prev` methods on the core page collections in Hugo. These works the same way as the built-in static variants one `Page`, e.g. `.Next` and `.NextInSection`:
```
-{{ with .Site.RegularPages.Next . }}{{.RelPermalink }}{{ end }}
+{{ with .Site.RegularPages.Next . }}{{ .RelPermalink }}{{ end }}
```
The above is a functionally equivalent (but slightly slower) variant of:
```
-{{ with .Next }}{{.RelPermalink }}{{ end }}
+{{ with .Next }}{{ .RelPermalink }}{{ end }}
```
See [Pages Methods](https://gohugo.io/variables/pages/) for more information.
diff --git a/content/en/readfiles/dateformatting.md b/content/en/readfiles/dateformatting.md
index 5e5e454fb..1128a01a1 100644
--- a/content/en/readfiles/dateformatting.md
+++ b/content/en/readfiles/dateformatting.md
@@ -61,7 +61,7 @@ Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbrev
To continue with the example above:
```go-html-template
-{{.Date.Format "Jan 2nd 2006"}}
+{{ .Date.Format "Jan 2nd 2006" }}
```
Hugo assumes you want to append `nd` as a string to the day of the month and outputs the following:
diff --git a/content/en/templates/404.md b/content/en/templates/404.md
index e1249b9b9..280a7b8db 100644
--- a/content/en/templates/404.md
+++ b/content/en/templates/404.md
@@ -27,12 +27,12 @@ In addition to the standard page variables, the 404 page has access to all site
This is a basic example of a 404.html template:
{{< code file="layouts/404.html" download="404.html" >}}
-{{ define "main"}}
-
-
+
{{ end }}
{{< /code >}}
diff --git a/content/en/templates/base.md b/content/en/templates/base.md
index 93f5110ef..654531fe6 100644
--- a/content/en/templates/base.md
+++ b/content/en/templates/base.md
@@ -82,7 +82,7 @@ The following shows how you can override both the `"main"` and `"title"` block a
{{< code file="layouts/_default/single.html" download="single.html" >}}
{{ define "title" }}
-
+
{{ .Title }} – {{ .Site.Title }}
{{ end }}
{{ define "main" }}
diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md
index 8ecde7b88..77c126b32 100644
--- a/content/en/templates/data-templates.md
+++ b/content/en/templates/data-templates.md
@@ -127,7 +127,7 @@ Achievements:
You can use the following code to render the `Short Description` in your layout:
```go-html-template
-
Short Description of {{.Site.Data.User0123.Name }}:
{{ index .Site.Data.User0123 "Short Description" | markdownify }}
+
Short Description of {{ .Site.Data.User0123.Name }}:
{{ index .Site.Data.User0123 "Short Description" | markdownify }}
```
Note the use of the [`markdownify` template function][markdownify]. This will send the description through the Markdown rendering engine.
diff --git a/content/en/templates/homepage.md b/content/en/templates/homepage.md
index c55b758f6..12102261e 100644
--- a/content/en/templates/homepage.md
+++ b/content/en/templates/homepage.md
@@ -33,27 +33,27 @@ See the homepage template below or [Content Organization][contentorg] for more i
## Example Homepage Template
-The following is an example of a homepage template that uses [partial][partials], [base] templates, and a content file at `content/_index.md` to populate the `{{.Title }}` and `{{.Content }}` [page variables][pagevars].
+The following is an example of a homepage template that uses [partial][partials], [base] templates, and a content file at `content/_index.md` to populate the `{{ .Title }}` and `{{ .Content }}` [page variables][pagevars].
{{< code file="layouts/index.html" download="index.html" >}}
{{ define "main" }}
-
-
-
{{.Title }}
- {{ with .Params.subtitle }}
- {{.}}
- {{ end }}
-
-
-
- {{.Content }}
-
-
- {{ range first 10 .Site.RegularPages }}
- {{ .Render "summary"}}
- {{ end }}
-
-
+
+
+
{{ .Title }}
+ {{ with .Params.subtitle }}
+ {{ . }}
+ {{ end }}
+
+
+
+ {{ .Content }}
+
+
+ {{ range first 10 .Site.RegularPages }}
+ {{ .Render "summary" }}
+ {{ end }}
+
+
{{ end }}
{{< /code >}}
diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md
index 8b1ae8428..13c6aeb83 100644
--- a/content/en/templates/introduction.md
+++ b/content/en/templates/introduction.md
@@ -544,11 +544,11 @@ Here is an example of corresponding code that could be used inside a `toc.html`
{{ if not .Params.notoc }}
{{ end }}
@@ -574,7 +574,7 @@ Within a footer layout, you might then declare a `