Created
May 14, 2013 09:15
-
-
Save timkg/5574709 to your computer and use it in GitHub Desktop.
A quick look at Jade extends, block, include.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file index.jade | |
html | |
head | |
block head | |
body | |
block content | |
// file view.jade | |
extends index.jade | |
block head | |
script(src='') | |
link(href='') | |
block content | |
h1 Hi there! | |
include message.jade | |
// file message.jade | |
p message of the day | |
// Now if you render view.jade, it includes message.jade, compiles everything, | |
// gets index.jade, and places the blocks at the corresponding place. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment