Quick start (developer reference)

Compile and render your first template. Getting started in the DocStudio developer reference.

This page compiles a template with data and renders HTML. Every example in this documentation is run by the test suite against the real implementation.

Compile and render

What happened

  1. compile took the template and the data. It validated the template, resolved the page configuration and bound the data. It returns { ok, tree, diagnostics, meta, trace }.
  2. tree is the resolved document tree (RDT): plain JSON with no bindings, conditions or repeaters left.
  3. render turned the tree into an HTML document for the screen target.

compile and render never throw for any input. Problems are returned as diagnostics.

Next steps