Skip to content

Template Functions Reference

Gozzi provides 40+ custom template functions in addition to Go's built-in template functions.

Quick Reference

CategoryFunctions
Mathadd, sub
Logicand, or, eq, ne, default
Stringscontains, has_prefix, has_suffix, starts_with, ends_with, replace, split, join, lower, upper, trim, urlize
Datesto_date, date, now
Contentmarkdown, get_section, priority
Assetsasset, load, load_attribute
Collectionsdict, first, last, limit, reverse, concat, sort_by, group_by, where
Utilitiespluralize, pagination, safe

Function Categories

Math & Logic

Perform calculations and logical operations.

Strings

Manipulate and format text.

Dates

Format and work with dates and times.

Content

Access and render content.

Collections

Filter, sort, and manipulate arrays.

Assets

Load and reference static assets.

Released under the MIT License.