- layouts
- pages
- partials
- data
defines common blocks using the jade block
statement.
doctype html
html
head
//- always used -> include
include ../partials/head
//- conditional -> block
block seo
body
block header
block navigation
.main
block column
block content
include ../partials/footer
defines the pages blocks and contents using the jade extends
and append
statement.
extends ../layouts/main.jade
append seo
meta(
name="description"
content="#{data.description}"
)
append header
include ../partials/header.jade
append navigation
include ../partials/navigation.jade
append content
include ../partials/homepage/helloworld.jade
smallest piece of the puzzle, reusable parts
h1 #{data.helloworld}
p #{data.someText}
some json
just run jade for pages/**.jade
, passing the data as local template variable.