summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-05-25 10:41:51 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-05-25 10:41:51 +0200
commit4f61a926f61b490ed9ddf8de276bc355448c5a86 (patch)
treef928ce54970e79e425364905cfde36218134b75d /docs/content/en/functions
parent5b4b8bb3c1ecb30e7a38ed44eb795f1d972cd320 (diff)
parentbe04ece8590f775a52ea167fbe4555753e8c5211 (diff)
Diffstat (limited to 'docs/content/en/functions')
-rw-r--r--docs/content/en/functions/md5.md2
-rw-r--r--docs/content/en/functions/sha.md4
-rw-r--r--docs/content/en/functions/where.md11
3 files changed, 13 insertions, 4 deletions
diff --git a/docs/content/en/functions/md5.md b/docs/content/en/functions/md5.md
index 31197f218..db5442166 100644
--- a/docs/content/en/functions/md5.md
+++ b/docs/content/en/functions/md5.md
@@ -14,7 +14,7 @@ keywords: []
signature: ["md5 INPUT"]
workson: []
hugoversion:
-relatedfuncs: []
+relatedfuncs: [sha]
deprecated: false
aliases: []
---
diff --git a/docs/content/en/functions/sha.md b/docs/content/en/functions/sha.md
index 4e1243469..d10da3446 100644
--- a/docs/content/en/functions/sha.md
+++ b/docs/content/en/functions/sha.md
@@ -14,9 +14,9 @@ keywords: [sha,checksum]
signature: ["sha1 INPUT", "sha256 INPUT"]
workson: []
hugoversion:
-relatedfuncs: []
+relatedfuncs: [md5]
deprecated: false
-aliases: []
+aliases: [sha1, sha256]
---
`sha1` hashes the given input and returns its SHA1 checksum.
diff --git a/docs/content/en/functions/where.md b/docs/content/en/functions/where.md
index 29623c908..ece4acb21 100644
--- a/docs/content/en/functions/where.md
+++ b/docs/content/en/functions/where.md
@@ -83,6 +83,15 @@ The following logical operators are available with `where`:
`intersect`
: `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
+## Use `where` with `Booleans`
+When using booleans you should not put quotation marks.
+```go-html-template
+{{range where .Pages ".Draft" true}}
+ <p>{{.Title}}</p>
+{{end}}
+```
+
+
## Use `where` with `intersect`
```go-html-template
@@ -122,7 +131,7 @@ then ranges through only the first 5 posts in that list:
You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
```go-html-template
-{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" "true" }}
+{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" true }}
```
## Unset Fields