Skip to content

Instantly share code, notes, and snippets.

@timkg
Created May 14, 2013 09:15
Show Gist options
  • Save timkg/5574709 to your computer and use it in GitHub Desktop.
Save timkg/5574709 to your computer and use it in GitHub Desktop.
A quick look at Jade extends, block, include.
// 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