[www] redner update: template file moved to options
This commit is contained in:
1 parent
67870d2705
commit
4c85a3115d
1 file changed
+2
-1
+2
-1
@@ -17,6 +17,7 @@ const defaultOptions = {
|
|||||||
commentsEnabled: false,
|
commentsEnabled: false,
|
||||||
showAuthor: false,
|
showAuthor: false,
|
||||||
menuPadding: false,
|
menuPadding: false,
|
||||||
|
templateFile: config.viewMain,
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultMeta = {
|
const defaultMeta = {
|
||||||
@@ -85,7 +86,7 @@ async function render(path, data, meta, options = {}) {
|
|||||||
const menu = buildMenu(path, menuModel)
|
const menu = buildMenu(path, menuModel)
|
||||||
const content = renderApp({...renderOptions, menu, component})
|
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 template = handlebars.compile(source)
|
||||||
|
|
||||||
const metaData = {
|
const metaData = {
|
||||||
|
|||||||
Reference in new issue
Block a user