Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render Handlebar templates server side in .NET/C# [closed]

Is there an existing library to render handlebar templates in .NET?

I would like to use this as a templating engine for users to create HTML email templates

I've spent a few hours looking, but can't seem to find anything. A wrapped up javascript rendering model would be ok, but a native library better.

Otherwise, is there a similar templating engine more suited to the .NET environment?

like image 590
Paul Grimshaw Avatar asked Apr 04 '13 14:04

Paul Grimshaw


People also ask

Are handlebars server-side?

Pro Handlebars Handlebars is good for rendering in CLI-apps, non-HTML text content, server-side rendering of pure contents. Handlebars has been ported to many programming languages (Java, Rust etc).

Is handlebars frontend or backend?

Handlebars is popular for both back-end and front-end templating. For example, the popular front-end framework Ember uses Handlebars as the templating engine. Handlebars is an extension of the Mustache template language, which is mostly focused on simplicity and minimal templating.

Is handlebars a template engine?

Handlebars is a simple templating language. It uses a template and an input object to generate HTML or other text formats.


1 Answers

Since this question was answered, a full-blown, native .NET library for Handlebars became available (disclosure: I am the primary author).

Handlebars.Net on GitHub and on NuGet

It compiles Handlebars templates to IL, and has excellent feature coverage.

like image 137
Rex M Avatar answered Sep 21 '22 11:09

Rex M