mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
committed by
Bjørn Erik Pedersen
parent
0c8f2dcb13
commit
de7d96fa28
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user