Is it's possible to make modular pug template in vibed?

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 9 02:30:15 PDT 2017


On Tuesday, 8 August 2017 at 15:54:29 UTC, Steven Schveighoffer 
wrote:
> On 8/8/17 10:52 AM, Suliman wrote:
>> your examples generate me:
>> 
>> 
>> <!DOCTYPE html>
>> <html>
>>      <head>
>>          <title>DLANG.ru</title>
>>      </head>
>>      <body>
>>          <div id="app">
>>              <div class="MainContainer">
>>                  <div class="footer">(c) DLANG 2017</div>
>>              </div>
>>          </div>
>>      </body>
>> </html>
>
> That's the template without the block.
>
>> The only one modification that I did I changes pages names:
>> extends home
>> 
>> because my main page is home.dt
>
> You have it backwards. You don't render the layout template, 
> but the template that extends the layout.
>
> -Steve

Big thanks! Now I understand. Now i redone dlang.ru in diet 
templates.

Am I right understand that include is needed only for small 
includes without any nesting levels?


More information about the Digitalmars-d-learn mailing list