Static Site Builder Util (SBU) 1.0 Documentation
The default source parser is the build-in standard user for the FTL file handler. It parses a text source file (usually HTML) for sections defined via specific commands (unsually embedded in special HTML comments). An example is '<!--# sbu:include -->'. The following commands exist:
The resulting text is build by chaining the include and component parts in the given sequence. This is a simple example:
This text will be ignored <!--# sbu:include --> This text will be included. <!--#/sbu:include --> <!--# sbu:component name="/template.ftl" --> This text will be ignored. <!--# sbu:include --> This text will be included. <!--#/sbu:include -->
There maybe one metadata section. Here some XML and/or attributes metadata can be specified. If defined there are two more objects available for the FREEMARKER process: xml and attributes. Whitespace is allowed. The metadata command must be the first one defined. Example:
<!--# sbu:metadata attributes={p1="..." p2="..." xml={<a><b>...</b></a>} -->
The include and /include commands mark a text section to include. An optional attribute 'xml = "true"' can be specified. In this case the text will handled as FREMARKER template itself. Example:
<!--# sbu:include ftl="true"--> Some content ${1+1} <!--# /sbu:include -->
Components are FTL templates from the resource folder. You have to specify them as a mapping from an identifying name to a template file path (e.g. '/component/table.ftl'). Root for inclusions is the resource folder. XML and/or attributes metadata can be specified (like for the metadata). The following objects are available for the templates in addition:
In addition to the components the following properties may be specified in the configuration file: