Template Properties 

Because you probably have a few current version numbers and things repeated throughout your documentation, Pamflet supports template properties through StringTemplate.

If a file template.properties is found in the pamflet source directory, all Markdown sources are passed through StringTemplate with the properties as read by java.util.Properties. This is an example template.properties:


Properties are referenced in sources by bracketing them with the dollar sign. In this example, occurrences of $version$ in the Markdown source would be replaced by 0.3.4 in the HTML output.

Properties Front Matter 

In addition, each page may add its own properties by including a properties front matter at the beginning of the page as follows:


Properties in the front matter takes precedence over the ones in template.properties.


Once activated by the presence of the .properties file, StringTemplate will be confused by any stray $ in your source. Always escape dollar signs that are not template properties with a backslash: \$

Fork me on GitHub