Examples

Explore examples to see and learn how to use HashScript in Docly™ to do wonderful things!

Bin­din­g

Examples of binding data from Docly documents and folders to HTML pages.

Da­te and ti­me

Examples using DateTime objects.

For loop­s

Examples of loops and iteration patterns over arrays, files and folders.

Lin­king ima­ges and fi­les

Examples for linking and embedding images and files in your documents and templates.

Cus­tom API

Examples showing how to build custom API endpoints in the # folder.

Fi­les and fol­der­s

Examples for reading files and folders from JavaScript and HashJS.

Se­curi­ty

Examples related to security and login.

St­ring examp­les

Examples for working with strings — joining, splitting, formatting and parsing.

Web­site­s

Examples for building published websites — navigation, SEO, redirects, forms and caching.

Da­ta

Data related functions through creating your own custom API.

Cus­tom ser­vice

Examples of scheduled services and background jobs running in the # folder.