|
|
|
@ -72,7 +72,10 @@ console.log('view engine template dir', { base_dir, template_dir: this.template_
|
|
|
|
|
* @return Promise<string>
|
|
|
|
|
*/
|
|
|
|
|
public async template(template_path: string, data: { [key: string]: any } = {}) {
|
|
|
|
|
const file_path = `${this.template_path(template_path.replace(/:/g, '/'))}${this.get_file_extension()}`
|
|
|
|
|
let file_path = `${this.template_path(template_path.replace(/:/g, '/'))}${this.get_file_extension()}`
|
|
|
|
|
if ( file_path.startsWith('file://') ) {
|
|
|
|
|
file_path = file_path.slice(7)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.logger.debug(`Rendering template "${template_path}" from file: ${file_path}`)
|
|
|
|
|
|
|
|
|
|