-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass locals in #9
Comments
Nevermind. I looked at the tests and found that I can pass in locals using the |
Should I add |
can you share the example code how to use |
@diammondore I have no idea what you are talking about. |
@phated I think @diammondore means an example of how to pass data to the compiler using this plugin. Here is a simple example: gulp.task('templates', function() {
gulp.src('src/templates/**/*.jade')
.pipe(jade({
pretty: true, // Feed the compiler
data: { // Feed the templates
title: 'Hello World!'
}
}))
.pipe(gulp.dest('build'));
}); |
sorry, my previous comment is not enough to describe my issues @rayfranco thanks, your code works, but as global data, I need little different i use template inheritance
i am trying to pass page title using variable
the issue is that the variable I'm not good at coding, so often use examples from documentation |
For HTML compilation it is useful to pass local variables into a Jade template. How should this be handled in gulp-jade?
The text was updated successfully, but these errors were encountered: