diff options
-rw-r--r-- | lib/generate/site/index.js | 11 | ||||
-rw-r--r-- | lib/parse/page.js | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index 99f5fb3..4179917 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -121,13 +121,10 @@ Generator.prototype.prepareFile = function(content, _input) { // Lex, parse includes and get // Get HTML generated sections return parse.page(page.content, { - // Directories to search for includes - dir: [ - // Local files path - path.dirname(_input) || '/', - // Project's include folder - path.join(that.options.input, '_includes'), - ], + // Local files path + dir: path.dirname(_input) || '/', + // Project's include folder + includes_dir: path.join(that.options.input, '_includes'), // Output directory outdir: path.dirname(_input) || '/', // Templating variables diff --git a/lib/parse/page.js b/lib/parse/page.js index 846d339..e694f1c 100644 --- a/lib/parse/page.js +++ b/lib/parse/page.js @@ -51,7 +51,7 @@ function parsePage(src, options) { options = options || {}; // Lex if not already lexed - return (_.isArray(src) ? src : lex(include(src, options.dir, options.variables))) + return (_.isArray(src) ? src : lex(include(src, [options.dir, options.includes_dir], options.variables))) .map(function(section) { // Transform given type if(section.type === 'exercise') { |