Liquid Filters and Globals

Filters transform values inside {{ }}. Seekdown registers a set tailored to the assistant — these are the building blocks you'll use constantly.

FilterWhat it doesExample
tTranslate by key, with a fallback.{{ 'ask' | t: 'Ask' }}
rResolve an assistant asset URL.{{ 'img/search.svg' | r }}
markdownRender markdown to HTML (pair with safe).{{ result.payload.reply | markdown | safe }}
safe / raw_htmlOutput HTML without escaping.{{ html | safe }}
ellipsisTruncate text with an ellipsis.{{ reference.summary | ellipsis: 160 }}
defaultFall back when empty.{{ reference.title | default: 'Untitled' }}
hasTemplateTrue if a template of that name exists.{% if reference.type | hasTemplate %}
fromNowRelative time.{{ result.date | fromNow }}
dateToString / dateFormatFormat a date.{{ date | dateToString: 'YYYY-MM-DD' }}
lengthLength of a string, array, or object.{{ state.results | length }}
entriesTurn an object into key/value pairs to loop.{% for e in form.fields | entries %}
lowerLowercase.{{ type | lower }}
sanitizeEscape quotes for use in attributes.data-x="{{ text | sanitize }}"
randomIdGenerate a unique id.{{ 'field_' | randomId }}
logPrint a value (JSON) for debugging.{{ state | log }}

Globals

Beyond state, the skdwn global gives templates access to the live instance — its config, helpers, templates, and startOptions — so a template can read a setting or reference a handler directly.

Go Deeper


Contact us

Still need help?

Tell us what you want your website assistant to answer. We will help you map the right content, controls, and launch path.