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
compiletook the template and the data. It validated the template, resolved the page configuration and bound the data. It returns{ ok, tree, diagnostics, meta, trace }.treeis the resolved document tree (RDT): plain JSON with no bindings, conditions or repeaters left.renderturned the tree into an HTML document for thescreentarget.
compile and render never throw for any input. Problems are returned as diagnostics.
Next steps
- Page settings, header and footer: Setup, templates and components
- Layout and data: Layout, binding and validation
- A PDF: Rendering, RTL, PDF and printing
- The visual editor: Designer, library and host