Closed itzaks closed 9 years ago
@itzaks Thanks for the pull request. I will look over it tonight! I was thinking that this would work by providing locals
as options when compiling the template as passed via @jadeOptions
. Did you try this?
module.exports.config =
plugins:
jaded:
jade:
locals:
site: 'monokro.me'
NOTE: The extra jade
sublevel is optional, but can be used to give exact options. Without it, jaded will try to use it's own options but pick only ones that aren't jaded-specific.
If you did try this and it doesn't work then the other concern here is that locals
would presumably need to somehow be available in the browser as well, so we may need to export wrapped template functions (or an additional file) to provide that. This could get messy, though.
I'm merging this, but would still be interested in a response from @itzaks. Let me know if you tested that. I'll deploy a new release tonight.
Hey! Sorry for not giving a response, seems like I missed that. Okay, cool :) Hm, as far as I remember I tested that without luck.
Previously there was no possible way of passing locals from
config.plugins.jaded
to the template rendering. This commit adds support forconfig.plugins.jaded.locals
object passed to each template file.