wq mustache

wq version: 1.1 1.2/1.3
Docs > wq.app: Build Tool

wq mustache


wq mustache is a component of the wq build process that can be used to convert a Mustache template and context object into a static HTML file. Note that wq mustache should not be used for dynamic content - wq/template.js and/or wq.db's template engine should be used for that instead.

The mustache: section in your wq.yml should include the following attributes. Multiple templates can be rendered by specifying mustache: as a list or array with multiple configurations. All paths are assumed to be relative to the current directory.

name purpose
template A string indicating the path to the template file, or a string containing the actual template markup.
context A string indicating the path to a folder of JSON or YAML files to use as the template context, or an object/dictionary to use as the template context.
partials A string indicating the path to a folder containing template partials, or an object/dictionary with partial names as keys and values corresponding to the partial markup.
output A string indicating the the filename of the output file.

wq mustache can also be configured entirely via command line options; for more information run wq mustache --help.