本文介绍了警告“图像"和“标志"有错误的价值观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用 JSON-LD 在我的博客列表中添加了 Schema.org:
I've added Schema.org on my blog list with JSON-LD:
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "Fixer la navigation Off-Canvas sur Foundation",
"image": "https://stephane-richin.s3-eu-central-1.amazonaws.com/S/foundation-website.jpg",
"author": "Stéphane Richin",
"datePublished": "2015-02-03",
"dateModified": "2015-02-03",
"publisher": {
"@type": "Organization",
"name": "Stéphane Richin",
"url": "http://stephane-richin.fr",
"logo" : "http://stephane-richin.fr/images/logo/logo-stephane-richin.svg"
},
"mainEntityOfPage": "True"
}
但是,我在 image
和 logo
上有 2 个警告:
But, I've 2 warnings on image
and logo
:
image.itemtype 值错误
logo.itemtype 值错误
logo.itemtype has wrong value
您知道为什么图片和徽标的值不正确吗?
Do you have any idea why image and logo have wrong values?
推荐答案
看起来为了通过 Structured Data Testing Tool 你需要使用 ImageObject
作为 requiredimage
和 publisher.logo
的属性.
Looks like in order to pass the Structured Data Testing Tool you need to use ImageObject
as a required property of image
and publisher.logo
.
来自他们的文档:
图像 - ImageObject,必需
您的最终代码将如下所示:
Your final code will look like:
{
"@context":"http://schema.org",
"@type":"BlogPosting",
"headline":"Fixer la navigation Off-Canvas sur Foundation",
"image": {
"@type": "ImageObject",
"url": "https://google.com/thumbnail1.jpg",
"height": 800,
"width": 800
},
"author": {
"@type": "Person",
"name": "Stéphane Richin"
},
"datePublished":"2015-02-03",
"dateModified":"2015-02-03",
"publisher": {
"@type":"Organization",
"name":"Stéphane Richin",
"url":"http://stephane-richin.fr",
"logo": {
"@type": "ImageObject",
"url": "https://google.com/logo.jpg",
"width": 600,
"height": 60
}
},
"mainEntityOfPage": "True"
}
我还修改了它以将作者识别为 Person schema.
I also amended it to recognise the author as Person schema.
这篇关于警告“图像"和“标志"有错误的价值观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!