Template functions · Lists
filter
Keep the items whose property matches a regular expression.
filter "property" "regex" listTakes the same properties as sort and a Go regular expression. Anchor the pattern with ^ and $ for an exact match.
Example
{{ $docs := sources "RelPath" "docs/*" }}
{{ range filter "Meta.section" "^Guides$" $docs }}
<li>{{ .Meta.title }}</li>
{{ end }}Other functions
data
sources
sort
limit
offset
select
paginate
pages
page
path
hash
json
contains
html
js
css