tide-handlebars
This crate exposes an extension trait that adds four functions to handlebars::Handlebars:
-
render_response- Render the template and return a tide response using the template name to assume the content type e.g.template.htmlwould set the content type to betext/html -
render_body- Render the template and return a tide body using the template name to assume the content type e.g.templatedefaults the content type to betext/plain -
render_response_ext- Render the template and return a tide response specifying the file extension explicitly e.g."html"would set the content type to betext/html -
render_body_ext- Render the template and return a tide body using the template extension to assume the content type
Documentation
usage
use Handlebars;
use BTreeMap;
use *;
async
See the main handlebars repo for full details on handlebars usage.