diff options
Diffstat (limited to 'lib/generate/page/index.js')
-rw-r--r-- | lib/generate/page/index.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/generate/page/index.js b/lib/generate/page/index.js index 3ee368f..c2f4484 100644 --- a/lib/generate/page/index.js +++ b/lib/generate/page/index.js @@ -25,14 +25,18 @@ swig.setFilter('code', function(code, lang) { var Generator = function() { BaseGenerator.apply(this, arguments); - // Load base template - this.template = swig.compileFile(path.resolve(this.options.theme, 'templates/page.html')); - // List of pages content this.pages = {}; }; util.inherits(Generator, BaseGenerator); +// Load all templates +Generator.prototype.loadTemplates = function() { + this.template = swig.compileFile( + this.plugins.template("page") || path.resolve(this.options.theme, 'templates/page.html') + ); +}; + Generator.prototype.convertFile = function(content, input) { var that = this; var json = { @@ -46,6 +50,7 @@ Generator.prototype.convertFile = function(content, input) { repo: that.options.githubId, dir: path.dirname(input) || '/', outdir: './', + singleFile: true }); }) .then(function(sections) { |