Temple: Compile time, embedded D templates
Jacob Carlborg
doob at me.com
Tue Dec 31 05:10:53 PST 2013
On 2013-12-31 07:05, Dylan Knutson wrote:
> Hello,
>
> A few months ago I had posted a project of mine, templ-d. It was an
> experiment in writing a template engine for embedding D code in
> arbitrary text files, a-la Vibe.d's Diet templates, but without the
> requirement of generating HTML.
>
> So, I've revamped templ-d, and written Temple in its place. It supports
> all the neat stuff that a template engine should, including (but not
> limited to!)
Looks quite nice.
Since you support setting variables in a context using opDispatch, why
no support opDispatch to get the variables as well? Something like this:
Hello, <%= var.name %>
And to convert to a specific type:
% if(var.should_bort!bool) {
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list