Created
January 4, 2014 02:35
-
-
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?
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
// 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. |
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
html | |
head | |
block head | |
body | |
h1 It's working if you can see content below: | |
block content |
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
layouts: | |
default: 'layout.jade' # tried changing to index.jade; didn't work |
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
// 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