From 432c798e7f2e30e3c4156ee8239c944434e3a5ca Mon Sep 17 00:00:00 2001 From: Grant Miller Date: Wed, 8 May 2013 06:49:22 -0700 Subject: [PATCH] partials relative to views, not path Partials are currently read relative to the dirname of the template you're rendering, not the views directory. This means that when you're rendering views/subfolder/page the partials in views/partials won't load correctly. --- lib/consolidate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/consolidate.js b/lib/consolidate.js index c04ab7f..0c9fb0b 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -116,7 +116,7 @@ function readPartials(path, options, fn) { function next(index) { if (index == keys.length) return fn(null); var key = keys[index]; - var file = join(dirname(path), partials[key] + extname(path)); + var file = join(options.settings.views, partials[key] + extname(path)); read(file, options, function(err, str){ if (err) return fn(err); options.partials[key] = str;