1. blueprint-template(5)
  2. Blueprint
  3. blueprint-template(5)

NAME

blueprint-template - mustache.sh template language syntax

SYNOPSIS

{{VARIABLE}}
{{#VARIABLE}}...{{/VARIABLE}}
{{^VARIABLE}}...{{/VARIABLE}}
{{!COMMENT}}
{{`COMMAND`}}
{{#`COMMAND`}}...{{/`COMMAND`}}

DESCRIPTION

Templates are rendered by blueprint-template(1) and blueprint-apply(1), and by POSIX shell code generated by blueprint-show(1). They use the mustache.sh template rendering engine.

Templates may make use of the following syntax:

{{VARIABLE}}

VARIABLE is read from the environment and substituted directly.

{{#VARIABLE}}...{{/VARIABLE}}

The intervening ... is substituted for the entire tag if VARIABLE is in the environmente and is non-empty. Other tags may be nested within.

{{^VARIABLE}}...{{/VARIABLE}}

The opposite of # sections: the intervening ... is substituted for the entire tag if VARIABLE is not in the environmente or is empty. Other tags may be nested within.

{{!COMMENT}}

The tag is removed unconditionally. Comments do not appear in the rendered output.

{{`COMMAND`}}

COMMAND is executed and anything written to standard output is substituted directly.

{{#`COMMAND`}}...{{/`COMMAND`}}

COMMAND is executed and ... is rendered once for each line written to standard output. The environment is unchanged from line-to-line except for the value of _M_LINE, which contains each successive line of standard output.

THEME SONG

The Flaming Lips - "The W.A.N.D. (The Will Always Negates Defeat)"

AUTHOR

Richard Crowley richard@devstructure.com

SEE ALSO

Part of blueprint(1).

mustache(5) at http://mustache.github.com/mustache.5.html and mustache.sh at https://github.com/rcrowley/mustache.sh.

  1. DevStructure
  2. December 2011
  3. blueprint-template(5)