Truly theme developer docs Guides Reference (format 1)

Markup

A template's output is HTML that Truly reads into a closed element tree. Anything outside this grammar fails the
page, which then falls back to the default theme. These rules hold whatever format_version a theme declares.

Elements

Allowed tags: div, section, article, header, footer, main, nav, aside, h1, h2, h3, h4, h5, h6, p, span, strong, em, small, ul, ol, li, br, hr, figure, figcaption, blockquote, dl, dt, dd, table, thead, tbody, tr, th, td, time, address, details, summary. Inline tags (the only ones a link may hold): span, strong, em, small, br, time. br and hr are empty.
Every other tag (including script, style, form, iframe, svg) fails the page, and so does any HTML parse error
(an unclosed tag or comment, a duplicate attribute). A complete <!-- comment --> is dropped.

Element Attributes
a href, class
img src, alt, class
time class, datetime
truly-icon data-icon, class
every other tag class

a is a link (href); img shows one of your theme's images (src="{{ 'name.webp' | asset_url }}") or the tenant's
logo from the drops, with alt required. time takes a datetime like 2030-03-04 or 2030-03-04T10:00.

Element May only hold
ul li
ol li
dl dt, dd
table thead, tbody
thead tr
tbody tr
tr th, td

A summary must be the first child of details. No link inside a link, no block element inside a link.

Classes

At most 16 per element, each matching [a-z][a-z0-9-]{0,47}. Your CSS selects them as written.

An href is an absolute https: URL without user name or password, or a path starting with a single /. Only
RFC 3986 characters: percent-encode anything else (/caf%C3%A9). The host is a plain ASCII host name, so a domain
with æ, ø or å is written in its xn-- form. No tel:, mailto: or other schemes. At most 2048 bytes.
Link between Truly's pages with {{ 'booking.locations' | route_url }}, which gives the URL for a route this page allows.

Icons

{% icon 'name' %} or {% icon 'name', class: 'small' %}: arrow-left, arrow-right, calendar, check, chevron-down, chevron-right, clock, info, mail, map-pin, menu, phone, scissors, star, user.

Liquid

Tags: #, assign, break, capture, case, comment, continue, cycle, doc, echo, for, icon, if, ifchanged, raw, render, slot, tablerow, unless. render takes a literal snippet name. include, increment and decrement are not available.

Filters: abs, append, asset_url, at_least, at_most, base64_decode, base64_encode, base64_url_safe_decode, base64_url_safe_encode, capitalize, ceil, compact, concat, date, default, divided_by, downcase, escape, escape_once, find, find_index, first, floor, h, has, join, last, lstrip, map, minus, modulo, newline_to_br, plus, prepend, reject, remove, remove_first, remove_last, replace, replace_first, replace_last, reverse, round, route_url, rstrip, size, slice, sort, sort_natural, split, squish, strip, strip_html, strip_newlines, sum, t, times, truncate, truncatewords, uniq, upcase, url_decode, url_encode, where. t looks up your locale strings, asset_url a file in assets/, route_url a route.

Every printed value is HTML-escaped; only {{ content_for_layout }} in the layout prints markup.

Limits

Limit Value
Template or snippet source 128 KB
Rendered page 128 KB
Elements and text nodes 2000
Nesting depth 32
One text node 8 KB
Render time 250 ms
Liquid render score 50000