public
anonymous / index.jade
Created

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?

  • Download Gist
index.jade
Jade
1 2 3 4 5 6 7 8 9
// 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.
layout.jade
Jade
1 2 3 4 5 6
html
head
block head
body
h1 It's working if you can see content below:
block content
main.coffee
CoffeeScript
1 2
layouts:
default: 'layout.jade' # tried changing to index.jade; didn't work
register_index.jade
Jade
1 2 3 4 5 6 7 8 9 10 11 12
// 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.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.