mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
Register entry partial even if custom template is provided
This commit is contained in:
parent
d8f2d95f92
commit
7b4c105046
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user