Templating
The whole point of a template language is to simplify things and for HTML+ it is all about writing less and making it as reusable as possible.
There are many ways to make templates small and reusable and HTML+ has few new and common features to do just that.
- Partials allow you to split your templates into small reusable parts that can be included in different templates.
- Template Injection allows you to inject markup inside partials so they can be dynamic and look different case by case while still reusable.
- Conditional render is important in defining what parts of the template should be sent to the browser depending on some logic in the template.
- Repetition makes your template smaller and capable of handling long list of data that would be tedious to type so you can only focus on the data that causes the repetition in the template.
- Variables are a powerful way to create local data, define reusable data as well as compacting logic that may crowd the template tags.
- Fragments are the simplest way to group tags either for repetition or logic without having to wrap them in a HTML tag.
- Customization is the most powerful aspect of templating. HTML+ allows you to create your own attributes and tags to take care of complex logic and calculation you can't do inside the templates.
- Debugging when you have powerful templates it only makes sense to be able to debug it efficiently. HTML+ helps you with that with specific error messages and a way to log your template logic or data.
All these features make HTML+ a unique template language to write powerful HTML pages. The best feature of all is that it is all HTML, no additional markup to create your templates. It should feel super familiar.