diff --git a/core/frontend/meta/schema.js b/core/frontend/meta/schema.js index 61c6e58e7b..6c9cbfc555 100644 --- a/core/frontend/meta/schema.js +++ b/core/frontend/meta/schema.js @@ -29,10 +29,7 @@ function schemaPublisherObject(metaDataVal) { '@type': 'Organization', name: escapeExpression(metaDataVal.site.title), url: metaDataVal.site.url || null, - logo: { - '@type': 'ImageObject', - url: schemaImageObject(metaDataVal.site.logo) || null - } + logo: schemaImageObject(metaDataVal.site.logo) || null }; return publisherObject; diff --git a/test/unit/data/meta/schema_spec.js b/test/unit/data/meta/schema_spec.js index 8db88604ac..2be518e096 100644 --- a/test/unit/data/meta/schema_spec.js +++ b/test/unit/data/meta/schema_spec.js @@ -93,12 +93,9 @@ describe('getSchema', function () { url: 'http://mysite.com', logo: { '@type': 'ImageObject', - url: { - '@type': 'ImageObject', - url: 'http://mysite.com/author/image/url/logo.jpg', - width: 500, - height: 500 - } + url: 'http://mysite.com/author/image/url/logo.jpg', + width: 500, + height: 500 } }, url: 'http://mysite.com/post/my-post-slug/' @@ -197,12 +194,9 @@ describe('getSchema', function () { url: 'http://mysite.com', logo: { '@type': 'ImageObject', - url: { - '@type': 'ImageObject', - url: 'http://mysite.com/author/image/url/logo.jpg', - width: 500, - height: 500 - } + url: 'http://mysite.com/author/image/url/logo.jpg', + width: 500, + height: 500 } }, url: 'http://mysite.com/post/my-page-slug/' @@ -304,12 +298,9 @@ describe('getSchema', function () { url: 'http://mysite.com', logo: { '@type': 'ImageObject', - url: { - '@type': 'ImageObject', - url: 'http://mysite.com/author/image/url/logo.jpg', - width: 500, - height: 500 - } + url: 'http://mysite.com/author/image/url/logo.jpg', + width: 500, + height: 500 } }, url: 'http://mysite.com/post/my-amp-post-slug/' @@ -368,10 +359,7 @@ describe('getSchema', function () { '@type': 'Organization', name: 'Site Title', url: null, - logo: { - '@type': 'ImageObject', - url: null - } + logo: null }, url: 'http://mysite.com/post/my-post-slug/' }); @@ -446,10 +434,7 @@ describe('getSchema', function () { '@type': 'Organization', name: 'Site Title', url: 'http://mysite.com', - logo: { - '@type': 'ImageObject', - url: 'http://mysite.com/author/image/url/logo.jpg' - } + logo: 'http://mysite.com/author/image/url/logo.jpg' }, url: 'http://mysite.com/post/my-post-slug/' }); @@ -492,10 +477,7 @@ describe('getSchema', function () { '@type': 'Organization', name: 'Site Title', url: null, - logo: { - '@type': 'ImageObject', - url: null - } + logo: null }, url: 'http://mysite.com/post/my-post-slug/' }); @@ -541,10 +523,7 @@ describe('getSchema', function () { '@type': 'Organization', name: 'Site Title', url: null, - logo: { - '@type': 'ImageObject', - url: null - } + logo: null }, url: 'http://mysite.com/post/my-post-slug/' });