mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 17:29:33 -05:00
621 B
621 B
title | description | categories | menu | keywords | signature | relatedfuncs | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
in | Checks if an element is in an array or slice--or a substring in a string---and returns a boolean. |
|
|
|
|
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 }}