Docly Developers
ExampleUpdated 17 Oct 2026

Simple binding

This example shows basic binding of data to HTML. This way you can generate HTML pages from your Docly documents. Hash expressions do not escape HTML: use docly.htmlEncode() for element content and docly.htmlAttributeEncode() inside attributes.

Example

Data

{
    "Name" : "test",
    "Number" : 123,
    "Email" : "test@test.net"
}

Code

Name is #docly.htmlEncode(Name)# and direct number #Number#.<br>
<a href="mailto:#docly.htmlAttributeEncode(Email)#">Send email</a>

Output

Name is test and direct number 123.<br>
<a href="mailto:test@test.net">Send email</a>