Template functions · Lists
limit
Take the first n items of a list.
limit n listReturns the whole list when it has n items or fewer. Combine it with sort for "latest" lists.
Example
{{ $posts := sort "Meta.date" "desc" (sources "RelPath" "blog/*") }}
{{ range limit 3 $posts }}
<a href="{{.Path}}">{{ .Meta.title }}</a>
{{ end }}Other functions
data
sources
sort
filter
offset
select
paginate
pages
page
path
hash
json
contains
html
js
css