0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

Merge pull request #46 from plitex/fix-custom-template

Register entry partial even if custom template is provided
This commit is contained in:
Trent Earl 2016-09-17 10:35:53 -05:00 committed by GitHub
commit bb7138c3f6

View file

@ -33,11 +33,12 @@ module.exports = function(config, auth, storage) {
Search.configureStorage(storage)
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8'))
if(config.web && config.web.template) {
var template = Handlebars.compile(fs.readFileSync(config.web.template, 'utf8'));
}
else {
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8'))
var template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.hbs'), 'utf8'))
}
app.get('/', function(req, res, next) {
@ -153,4 +154,3 @@ module.exports = function(config, auth, storage) {
})
return app
}