diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/template/index.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/template/index.js b/lib/template/index.js index 8266572..bb8272c 100644 --- a/lib/template/index.js +++ b/lib/template/index.js @@ -6,7 +6,6 @@ var escapeStringRegexp = require('escape-string-regexp'); var Promise = require('../utils/promise'); var error = require('../utils/error'); -var gitbook = require('../gitbook'); var defaultBlocks = require('./blocks'); var Loader = require('./loader'); @@ -345,29 +344,10 @@ TemplateEngine.prototype.render = function(content, context, options) { path: null }); - // Setup context for the template - context = _.extend({}, context, { - // Variables from book.json - book: this.book.config.get('variables'), - - // Complete book.json - config: this.book.config.dump(), - - // infos about gitbook - gitbook: { - version: gitbook.version, - generator: this.book.config.get('generator') - } - }); - // Setup path and type if (options.path) { options.path = this.book.resolve(options.path); } - if (!context.type && options.path) { - var parser = parsers.get(path.extname(options.path)); - context.type = parser? parser.name : null; - } // Replace shortcuts content = this.applyShortcuts(options.type, content); |