mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit '32ba623541d74ee0b7ae4efb1b8326dc49af28b8'
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user