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.
| Filter | What it does | Example |
|---|---|---|
t | Translate by key, with a fallback. | {{ 'ask' | t: 'Ask' }} |
r | Resolve an assistant asset URL. | {{ 'img/search.svg' | r }} |
markdown | Render markdown to HTML (pair with safe). | {{ result.payload.reply | markdown | safe }} |
safe / raw_html | Output HTML without escaping. | {{ html | safe }} |
ellipsis | Truncate text with an ellipsis. | {{ reference.summary | ellipsis: 160 }} |
default | Fall back when empty. | {{ reference.title | default: 'Untitled' }} |
hasTemplate | True if a template of that name exists. | {% if reference.type | hasTemplate %} |
fromNow | Relative time. | {{ result.date | fromNow }} |
dateToString / dateFormat | Format a date. | {{ date | dateToString: 'YYYY-MM-DD' }} |
length | Length of a string, array, or object. | {{ state.results | length }} |
entries | Turn an object into key/value pairs to loop. | {% for e in form.fields | entries %} |
lower | Lowercase. | {{ type | lower }} |
sanitize | Escape quotes for use in attributes. | data-x="{{ text | sanitize }}" |
randomId | Generate a unique id. | {{ 'field_' | randomId }} |
log | Print 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.