Template functions · Helpers
contains
Check whether a string contains a substring.
contains "substring" stringNote the order: the substring comes first, so it reads well in a pipeline.
Example
{{ if contains "/blog/" .Source.Path }}
<a href="{{ path "/blog" }}">All posts</a>
{{ end }}Other functions
data
sources
sort
filter
limit
offset
select
paginate
pages
page
path
hash
json
html
js
css