From d4dc716acd278e923cc7970e2a850267ade24bf9 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 5 Aug 2014 17:17:05 -0400 Subject: [PATCH] filter:templates.get_config, allows you to modify template config as found here https://github.com/NodeBB/nodebb-theme-vanilla/blob/master/templates/config.json @Schamper --- src/routes/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/api.js b/src/routes/api.js index e080df9277..e152715beb 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -150,7 +150,10 @@ function getTemplatesListing(req, res, next) { plugins.fireHook('filter:templates.get_virtual', [], next); }, config: function(next) { - fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), next); + fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), function(err, config) { + config = JSON.parse(config.toString()); + plugins.fireHook('filter:templates.get_config', config, next); + }); }, }, function(err, results) { if (err) {