mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Merge pull request #2017 from ErisDS/issue-1975
Upgrade express-hbs, and switch to using registerPartial
This commit is contained in:
commit
33421e6aba
2 changed files with 2 additions and 3 deletions
|
@ -17,8 +17,7 @@ templates.execute = function (name, context) {
|
||||||
|
|
||||||
// If the partial view is not compiled, it compiles and saves in handlebars
|
// If the partial view is not compiled, it compiles and saves in handlebars
|
||||||
if (typeof partial === 'string') {
|
if (typeof partial === 'string') {
|
||||||
partial = hbs.handlebars.compile(partial);
|
hbs.registerPartial(partial);
|
||||||
hbs.handlebars.partials[name] = partial;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new hbs.handlebars.SafeString(partial(context));
|
return new hbs.handlebars.SafeString(partial(context));
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"connect-slashes": "1.2.0",
|
"connect-slashes": "1.2.0",
|
||||||
"downsize": "0.0.4",
|
"downsize": "0.0.4",
|
||||||
"express": "3.4.6",
|
"express": "3.4.6",
|
||||||
"express-hbs": "0.5.2",
|
"express-hbs": "0.7.6",
|
||||||
"fs-extra": "0.8.1",
|
"fs-extra": "0.8.1",
|
||||||
"knex": "0.5.0",
|
"knex": "0.5.0",
|
||||||
"moment": "2.4.0",
|
"moment": "2.4.0",
|
||||||
|
|
Loading…
Add table
Reference in a new issue