Merge commit '32ba623541d74ee0b7ae4efb1b8326dc49af28b8'

This commit is contained in:
Bjørn Erik Pedersen
2021-06-08 18:47:53 +02:00
21 changed files with 981 additions and 84 deletions

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