Temple templates with vibe.d support and first D experiences

Sönke Ludwig via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 7 15:44:41 PDT 2015


Am 20.03.2015 um 10:42 schrieb "István Zólyomi":
> Still does not compile, thanks for the idea though. I think it's better
> to avoid Temple, compilation of Diet templates seems to be better
> anyway. E.g. temple seems to accept <% var.nonexistingname %> while diet
> gives a compile error for #{nonexistingname}.
>
> Meanwhile I figured out an easy way to use existing HTML files with
> Diet, you can avoid reformatting your files to this exotic format. Just
> mark each line to be predefined content, simply prefixing them with the
> '|' character like this:
>
> doctype html
> | <html>
> | <head> <title> testing vibe </title> </head>
> | <body>
> |     <h1> My vibe example </h1>
> |     Hello #{username}!
> |     <p> #{content} </p>
> | </body>
> | </html>
>
> This can be easily automated by a few-liner script or whatever you prefer.
>
>
>
> On Wednesday, 18 March 2015 at 16:27:41 UTC, John Colvin wrote:
>> It might not solve your problem but i strongly recommend using 2.066.1
>> instead. There are serious problems with 2.066.0 that were fixed in
>> 2.066.1
>

Another possibility is to use a Jade-to-HTML converter, such as 
http://html2jade.org/


More information about the Digitalmars-d-learn mailing list