From 4c85a3115d85059b8cadc742a47bf5bef8062c53 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Sun, 15 Oct 2017 16:20:32 +0300 Subject: [PATCH] [www] redner update: template file moved to options --- src/lib/render.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/render.js b/src/lib/render.js index fc5fe7fb..ae6c5ebb 100644 --- a/src/lib/render.js +++ b/src/lib/render.js @@ -17,6 +17,7 @@ const defaultOptions = { commentsEnabled: false, showAuthor: false, menuPadding: false, + templateFile: config.viewMain, } const defaultMeta = { @@ -85,7 +86,7 @@ async function render(path, data, meta, options = {}) { const menu = buildMenu(path, menuModel) const content = renderApp({...renderOptions, menu, component}) - const source = await readFile(config.viewMain, 'utf-8') + const source = await readFile(renderOptions.templateFile, 'utf-8') const template = handlebars.compile(source) const metaData = {