Templates allow you to avoid duplicating code in pages. They are similar to using custom elements in JavaScript frameworks like Angular and React. They work both in Markdown and Html pages.
For example using the code <card> ... some content ... <\card>
produces a material design styled card which is used on this page containing this text.
The code for the entire <card>
template looks like this:
<TName name="card"/>
<div class="card" style="padding: 20px; margin-top: 28px; margin-bottom: 20px;">
@ChildContent;
</div>
Other than the main content text you see in these pages, everything else in this documentation is created using templates. This makes the documentation fully customizable. You can edit the templates to adjust the styles or layouts, or create your own template from scratch. For example, this template was made using the CSS framework Bulma, but you could write your own using Bootstrap if you prefer.
To create your own template you just need to create a HTML file in the Templates directory like the one shown above.
Templates can also accept parameters like this <mytemplate myproperty="myvalue"/>
and have a few other features. To see all the features templates support, please see the GitHub Wiki.