0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Don't clobber blog.logo in metadata

- Ghost logo suddenly appearing was raised as an issue in slack
- This copies the blog object, so that the logo doesn't get overridden
This commit is contained in:
Hannah Wolfe 2016-05-18 19:21:45 +01:00
parent 06cccd7e93
commit 6737427ce9

View file

@ -1,4 +1,5 @@
var config = require('../../config'),
var _ = require('lodash'),
config = require('../../config'),
getUrl = require('./url'),
getCanonicalUrl = require('./canonical_url'),
getPaginatedUrl = require('./paginated_url'),
@ -19,9 +20,7 @@ var config = require('../../config'),
getExcerpt = require('./excerpt');
function getMetaData(data, root) {
var blog = config.theme, metaData;
metaData = {
var metaData = {
url: getUrl(data, true),
canonicalUrl: getCanonicalUrl(data),
previousUrl: getPaginatedUrl('prev', data, true),
@ -38,7 +37,7 @@ function getMetaData(data, root) {
publishedDate: getPublishedDate(data),
modifiedDate: getModifiedDate(data),
ogType: getOgType(data),
blog: blog
blog: _.cloneDeep(config.theme)
};
metaData.blog.logo = metaData.blog.logo ?