View Source Rivet.Template (rivet v2.0.2)

Rivet Templates. Structure:

  • ^=== (.*)$ is the delimiter, where the captured part is the section label
  • First line of file MUST be === rivet-template-v1
  • Delimiter of equals vs dashes so that individual sections may include yaml which has multiple yaml docs within.
  • First section is a "meta" section defining the other sections in any order, matching off the key:value pair where the key is the section label, and the value of the key:value pair represents the type of data within that section.
sections:
  - constants: yml
  - inputs: eex-yml
  - rack: eex-yml

With this example there would be a total of four sections in the template (the first being this spec), and the next three are labelled as shown.

Link to this section Summary

Link to this section Functions

Link to this function

load_file(path, opts \\ [])

View Source
Link to this function

load_string(string, opts \\ [])

View Source