taragen static sites from one binary

Go templates

.tmpl files use Go's text/template with [[ and ]] as delimiters, so they don't clash with {...} in content and code. Output isn't auto-escaped. Frontmatter works as in Markdown.

Helper Meaning
[[ content ]] In a layout, the wrapped content; in a page, the body.
[[ page "title" ]] A string value from page data.
[[ partial "_partials/footer" ]] Includes a partial.
safeHTML Returns its argument unchanged; kept for compatibility.

The page helper only handles string values, and templates have no pages helper, so lists like tags, backlinks, and listings are for JSX.

[ txt · edit on github · card ]