mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Pass options to context of theme
This commit is contained in:
@@ -206,7 +206,6 @@ WebsiteOutput.prototype.finish = function() {
|
||||
// Templates are stored in `_layouts` folders
|
||||
WebsiteOutput.prototype.render = function(tpl, context) {
|
||||
var filename = this.templateName(tpl);
|
||||
|
||||
context = _.extend(context, {
|
||||
template: {
|
||||
// Same template but in the default theme
|
||||
@@ -218,7 +217,9 @@ WebsiteOutput.prototype.render = function(tpl, context) {
|
||||
|
||||
plugins: {
|
||||
resources: this.resources
|
||||
}
|
||||
},
|
||||
|
||||
options: this.opts
|
||||
});
|
||||
|
||||
return Promise.nfcall(this.env.render.bind(this.env), filename, context);
|
||||
|
||||
Reference in New Issue
Block a user