mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
b9bd35d72e
git-subtree-dir: docs git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
728 B
728 B
title | linktitle | description | godocref | date | publishdate | lastmod | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
in | Checks if an element is in an array or slice--or a substring in a string---and returns a boolean. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
|
false |
The elements supported are strings, integers and floats, although only float64 will match as expected.
In addition, in
can also check if a substring exists in a string.
{{ if in .Params.tags "Git" }}Follow me on GitHub!{{ end }}
{{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}