Origami expressions in YAML

When you load YAML files in Origami, any values tagged with the !ori YAML tag will be evaluated as Origami expressions.

Suppose expressions.yaml contains:

name: world
message: !ori greet.js(name)
names:
  - Alice
  - Bob
  - Carol
greetings: !ori "@map(names, greet.js)"

The greetings expression above is in double quotes because YAML prohibits values from starting with an @ at sign or a ` backtick. If your Origami expression starts with one of those characters, quote the expression in double quotes or surround it with parentheses.

You can invoke this file to evaluate its expressions:

$ ori expressions.yaml/
name: world
message: Hello, world.
names:
  - Alice
  - Bob
  - Carol
greetings:
  - Hello, Alice.
  - Hello, Bob.
  - Hello, Carol.

This lets you treat a YAML file as a template for data.