Liquid Templating
Definer uses the Liquid template language in places where text needs to be built dynamically from your current lookup, source result, or other runtime data.
In the recipe editor, every mapping field can contain either plain text or a Liquid template. Lookup data shown in the left pane is the data your template can read from.
Recipe Editor Basics
Simplest Liquid expression inserts a value:
{{data.headword}}That means:
datais the source result data from the current lookupheadwordis one field inside that data- final rendered value replaces the
{{ ... }}expression
You can mix normal text with dynamic values:
{{data.headword}} - {{data.srcLanguage}}Where Data Comes From
When you edit a recipe, the left pane shows two things:
- rendered source result
- raw lookup data as JSON
That JSON structure is the easiest way to understand what values are available to your template. If you see a path like data.headword or lookup.meta.created in the left-side data, you can usually reference it in a field with Liquid syntax:
{{data.headword}}
{{lookup.meta.created}}Common Examples
Save main term
{{data.headword}}Save lookup timestamp
{{lookup.meta.created}}Combine multiple values
{{data.headword}} ({{data.srcLanguage}})Build tags dynamically
{{data.srcLanguage}}
dictionaryFilters
Liquid filters let you transform a value before it is saved.
{{data.headword | upcase}}
{{data.headword | downcase}}
{{data.headword | default: "Unknown"}}Logic and Loops
For more advanced recipes, Liquid also supports conditions and loops:
{% if data.headword %}
{{data.headword}}
{% endif %}{% for sense in data.senses %}
{{sense.gloss}}
{% endfor %}Tips
- Start simple. First make one field work with
{{...}}, then add more logic only if you need it. - Use the left-side lookup data as your source of truth when deciding which path to reference.
- If a field should stay constant, you can enter plain text without any Liquid syntax.
- If you are unsure whether a value exists, use a
defaultfilter to provide a fallback.