diff options
-rw-r--r-- | lib/output/website/themeLoader.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/output/website/themeLoader.js b/lib/output/website/themeLoader.js index bcfea5a..774a39e 100644 --- a/lib/output/website/themeLoader.js +++ b/lib/output/website/themeLoader.js @@ -35,10 +35,14 @@ var ThemeLoader = nunjucks.Loader.extend({ return null; } + var src = fs.readFileSync(fullpath, 'utf-8'); + + src = '{% do %}var template = template || {}; template.stack = template.stack || []; template.stack.push(template.self); template.self = ' + JSON.stringify(templateName) + '{% enddo %}\n' + + src + + '\n{% do %}template.self = template.stack.pop();{% enddo %}'; + return { - src: '{% do %}template = template || {}; template.stack = template.stack || []; template.stack.push(template.self); template.self = ' + JSON.stringify(templateName) + '{% enddo %}\n' + - fs.readFileSync(fullpath, 'utf-8') + - '\n{% do %}template.self = template.stack.pop();{% enddo %}', + src: src, path: fullpath, noCache: true }; |