summaryrefslogtreecommitdiffstats
path: root/lib/output/website/onPage.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-04-25 21:13:17 +0200
committerSamy Pesse <samypesse@gmail.com>2016-04-25 21:13:17 +0200
commitc34a9f6213c204c43c78dd691a5295d7e5a757e8 (patch)
tree96f287daa52ade759b7b0e635b6e36dea7acaf86 /lib/output/website/onPage.js
parentf5df41c75f6e6d25ffc9f86feeac29892fb9f856 (diff)
downloadgitbook-c34a9f6213c204c43c78dd691a5295d7e5a757e8.zip
gitbook-c34a9f6213c204c43c78dd691a5295d7e5a757e8.tar.gz
gitbook-c34a9f6213c204c43c78dd691a5295d7e5a757e8.tar.bz2
Copy assets from themes to output folder
Diffstat (limited to 'lib/output/website/onPage.js')
-rw-r--r--lib/output/website/onPage.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/output/website/onPage.js b/lib/output/website/onPage.js
index b6856b3..aedb8c0 100644
--- a/lib/output/website/onPage.js
+++ b/lib/output/website/onPage.js
@@ -14,13 +14,19 @@ var createTemplateEngine = require('./createTemplateEngine');
function onPage(output, page) {
var options = output.getOptions();
var prefix = options.get('prefix');
- var engine = createTemplateEngine(output);
+ var engine = createTemplateEngine(output, page.getPath());
return Modifiers.modifyHTML(page, getModifiers(output, page))
.then(function(resultPage) {
// Generate the context
var context = JSONUtils.encodeBookWithPage(output.getBook(), resultPage);
+ context.template = {
+ getJSContext: function() {
+ return {};
+ }
+ };
+
// Render the theme
return Templating.renderFile(engine, prefix + '/page.html', context)