I use Ghost as an npm module after this guide .
I would like to add some custom helpers that can be used inside my themes. Is there a way to do this without changing the code inside the Ghost module?
This is my current code:
const ghost = require('ghost'); const path = require('path'); const hbs = require('express-hbs'); const config = path.join(__dirname, 'config.js'); const coreHelpers = {}; coreHelpers.sd_nls = require('./sd_nls');
I think one of the possible problems is that my hbs is a new instance of handlebars and not the one used by Ghost, so when Ghost is running it does not contain any helpers that I registered.
JuanCaicedo
source share