Difference between revisions of "User:Csmith1991/Vibe.d Documentation/diet"

From D Wiki
Jump to: navigation, search
m (Vibe.d Websocket's Tutorial)
m
Line 1: Line 1:
 
==Vibe.d Diet Template's Tutorial==
 
==Vibe.d Diet Template's Tutorial==
 +
 +
This tutorial is extended from [https://github.com/rejectedsoftware/vibe.d/tree/master/examples/diet here]. In this tutorial we will implement [https://github.com/h5bp/html5-boilerplate HTML5 Boilerplate] using diet templates.
 +
 +
=== Diet Templates overview ===
 +
Diet templates are an implementation of [http://jade-lang.com/ Jade] used for terse generic markup. They're some notable differences and bugs in its current implementation that we'll cover as we come across them. If you've used Razor files in ASP.Net these should feel quite similar. The main selling points of using Diet Templates are:
 +
 +
* Keeps things DRY
 +
* Creates dynamic HTML
 +
* Compiled to native code
 +
 +
 +
=== Vibe API ===
 +
Vibe does its best to exactly mirror Jade's. They're a few notable differences:
 +
 +
* You can embed D! No need for JavaScript.
 +
* Block, Extends, and Includes don't work quite right at the moment.
 +
 +
==== Documentation links:====
 +
* Vibe's documentation is located [http://vibed.org/templates/diet here].
 +
* Supplemental documentation can be found on [http://jade-lang.com/ Jade's website].
 +
 +
=== Code ===
 +
TODO

Revision as of 03:22, 2 December 2015

Vibe.d Diet Template's Tutorial

This tutorial is extended from here. In this tutorial we will implement HTML5 Boilerplate using diet templates.

Diet Templates overview

Diet templates are an implementation of Jade used for terse generic markup. They're some notable differences and bugs in its current implementation that we'll cover as we come across them. If you've used Razor files in ASP.Net these should feel quite similar. The main selling points of using Diet Templates are:

  • Keeps things DRY
  • Creates dynamic HTML
  • Compiled to native code


Vibe API

Vibe does its best to exactly mirror Jade's. They're a few notable differences:

  • You can embed D! No need for JavaScript.
  • Block, Extends, and Includes don't work quite right at the moment.

Documentation links:

  • Vibe's documentation is located here.
  • Supplemental documentation can be found on Jade's website.

Code

TODO