Liking cljdoc? Tell your friends :D

stencil.api

A simple public API for document generation from templates.

A simple public API for document generation from templates.
raw docstring

cleanup!clj

(cleanup! template)
source

fragmentclj

(fragment f)

Converts input to a fragment instance

Converts input to a fragment instance
sourceraw docstring

prepareclj

(prepare input)

Creates a prepared template instance from an input document.

Creates a prepared template instance from an input document.
sourceraw docstring

render!clj

(render! template template-data & {:as opts})

Takes a prepared template instance and renders it. By default it returns an InputStream of the rendered document.

Options map keys:

  • {:fragments {"fragmentName" fragment-object}} map of document fragments to embed in template.
  • {:output FNAME} renders output to file FNAME (string or File object). Throws exception if file already exists and :overwrite? option is not set.
  • {:output STREAM} writes output to an OutputStream object.
  • {:output :input-stream} returns an input stream of the result document.
Takes a prepared template instance and renders it.
 By default it returns an InputStream of the rendered document.

Options map keys:
- {:fragments {"fragmentName" fragment-object}} map of document fragments to embed in template.
- {:output FNAME} renders output to file FNAME (string or File object). Throws exception
  if file already exists and :overwrite? option is not set.
- {:output STREAM} writes output to an OutputStream object.
- {:output :input-stream} returns an input stream of the result document.
sourceraw docstring

versionclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close