Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-08 19:47:53 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-08 19:47:53 +0300
commit162f41d0efdd4a5e12e489cf8ecf8490b45884da (patch)
treea7e2337c45a581e150d35b3be97afb52b1e4de27 /docs/content/en/templates
parent552cef5c576ae4dbf4626f77f3c8b15b42a9e7f3 (diff)
parent32ba623541d74ee0b7ae4efb1b8326dc49af28b8 (diff)
Merge commit '32ba623541d74ee0b7ae4efb1b8326dc49af28b8'
Diffstat (limited to 'docs/content/en/templates')
-rw-r--r--docs/content/en/templates/introduction.md16
-rw-r--r--docs/content/en/templates/lookup-order.md2
2 files changed, 17 insertions, 1 deletions
diff --git a/docs/content/en/templates/introduction.md b/docs/content/en/templates/introduction.md
index 17fa5475c..fd34842d4 100644
--- a/docs/content/en/templates/introduction.md
+++ b/docs/content/en/templates/introduction.md
@@ -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
diff --git a/docs/content/en/templates/lookup-order.md b/docs/content/en/templates/lookup-order.md
index e4cb8e552..0d52213c3 100644
--- a/docs/content/en/templates/lookup-order.md
+++ b/docs/content/en/templates/lookup-order.md
@@ -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