Template functions · Content
sources
List source files whose property matches a glob.
sources "property" "glob"Returns every source file whose property matches the glob. Properties: Path (public URL), Local (absolute file path), Filename, RelPath (path under src/), Ext, and Meta.<key> for any frontmatter value.
Globs support *, ?, [abc] and {a,b}. * also matches /, so blog/* includes nested files. Each result exposes .Path, .Meta, .LastMod and the other source fields.
Listing pages are dependency-tracked: adding a post rebuilds the pages that list it.
Example
{{ range sources "RelPath" "blog/*" }}
<a href="{{.Path}}">{{ .Meta.title }}</a>
{{ end }}
{{ $pages := sources "Local" "**/src/**.{html,md}" }}Other functions
data
sort
filter
limit
offset
select
paginate
pages
page
path
hash
json
contains
html
js
css