Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2014 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8250758 to your computer and use it in GitHub Desktop.
Save anonymous/8250758 to your computer and use it in GitHub Desktop.
Trying to use jade blocks with roots.cx. I have two views here: index.jade and register/index.jade. This results in index.html and register/index.html. However, both pages did not substitute blocks correctly; they have no title and no content (they only display the static h1 prewritten in layout.jade). What could be the problem?
// root index.jade
extends layout
block head
title Home | My Wonderful Site
block content
h1 Welcome to the home page
p Lorem ipsum dolor sit amet, consectetur adipiscing elit.
html
head
block head
body
h1 It's working if you can see content below:
block content
layouts:
default: 'layout.jade' # tried changing to index.jade; didn't work
// note: Github Gist doesn't allow subfolders
// this would normally be in /register/index.jade
// register index.jade
extends layout
block head
title Register | My Wonderful Site
block content
h1 Register for the event!
p Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment