Skip to content

return

Source

Hook for stopping parsing and returning a given value instead of the public context data. For strings it renders the value, for dicts / lists it parses it, for everything else (bool / int) it returns the value as is.

Inputs

Name Type Default Required Description
value Any None False The value to return.

Arguments

Position Argument Type
1 value Any

Returns

Any

Examples

The return hook stops parsing and returns whatever value by rendering

foo:
  bar: baz
ignored key->: return foo

bar: baz

The return hook can also be a special key

foo:
  bar: baz
return->: foo --if true

bar: baz