I am using Jade (without Express, just for static HTML templating) - which I understood as able to create partials, meaning scope is not an issue, but this doesn\'t seem to
You could accomplish this with a mixin like so:
master.jade
include includes/header
!!!
html
block vars
- var slug= 'home'
head
block pagetitle
title Static HTML
link(rel='stylesheet', href='css/styles.css')
body(class= slug)
.wrapper
mixin header(slug)
includes/header.jade
mixin header(klass)
.header
ul
li(class= klass)
When compiled:
Static HTML