Liquid to HTML Sample

This is a sample Document.Factory document containing a Liquid Template that generates an HTML document.

Generation: 9:29 p.m. on February 22, 2015

File Content

The first line of a file is a header that specifies the kind of information contained in the file - in this case, the reserved word `liquid` specifies that this contains a liquid template for processing.

Liquid Templates in Document.Factory have the addition of an optional YAML header. Data from this header is made available to the template for processing.

If present, the YAML header is separated from the Markdown content by a line starting with `---`. The YAML header may be empty, in which case the divider will appear on the second line of the file.

Some aspects of the HTML output from the Markdown conversion can be controlled by specifying any or all the following variables within the Markdown header.

outputType - specifies the kind of output document generated by the template. If not given, defaults to html.

Other data included in the YAML header may be used by the template.

How it works

  1. The Liquid templating engine generates an HTML output fragment.
  2. The HTML fragment is written into an output file.

Further Information

For more information about Liquid Templates, see the following links: