summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-22 16:58:47 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-22 16:58:47 +0100
commit1bf6abf3385799aa8df7058139fcb8420943dee8 (patch)
treeafe997a55ce75cf47646058ef288b85457b8684c
parentc7b1d72bf0bec4758958040f375632305bbbffbe (diff)
downloadgitbook-1bf6abf3385799aa8df7058139fcb8420943dee8.zip
gitbook-1bf6abf3385799aa8df7058139fcb8420943dee8.tar.gz
gitbook-1bf6abf3385799aa8df7058139fcb8420943dee8.tar.bz2
Pass options to context of theme
-rw-r--r--book.pdfbin0 -> 173360 bytes
-rw-r--r--lib/output/website.js5
2 files changed, 3 insertions, 2 deletions
diff --git a/book.pdf b/book.pdf
new file mode 100644
index 0000000..2ec0c28
--- /dev/null
+++ b/book.pdf
Binary files differ
diff --git a/lib/output/website.js b/lib/output/website.js
index c1b0a6c..d480550 100644
--- a/lib/output/website.js
+++ b/lib/output/website.js
@@ -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);