Transformers

You can apply a chain of multiple Stream transformations to Template output using Transformers which are just functions that
accept an Input Stream and return a modified Output Stream. The MarkdownPageFormat's TransformToHtml shows an example
of a Transformer which converts Markdown Input and returns a Stream of HTML output:

After the Template is evaluated it's entire output gets passed into the chain of OutputTransformers defined, which in this case will
send a MemoryStream of the generated Markdown Output into the MarkdownPageFormat.TransformToHtml transformer which returns
a Stream of converted HTML which is what's written to the OutputStream.

Page Transformers

You can also apply Transformations to only the Page's output using Page Transformers which you would do if only the page was in
Markdown and the _layout was already in HTML, e.g:

Filter Transformers

Filter Transformers are used to apply Stream Transformations to Block Filters which you
could use if you only wanted to convert an embedded Markdown file inside a Page to HTML. You can register Filter Transformers
in either the TemplateContext's or PageResult's FilterTransformers Dictionary by assigning it the name you want it available in
your Templates under, e.g:

PageResult with Filter Transformer

varhtml = newPageResult(context.GetPage("page")).Result;

htmlencode

The htmlencode Filter Transformer is pre-registered in TemplateContext which lets you encode Block Filter outputs
which is useful when you want to HTML Encode a text file before embedding it in the page, e.g: