提问人:Puttputt 提问时间:3/10/2023 最后编辑:SeanPuttputt 更新时间:3/14/2023 访问量:135
模式标记:嵌套了很多元素,但我无法找出适合它们的正确顺序
Schema Markup: Nesting lots of elements, but i can't figure out the proper order to fit them
问:
经过测试,我想要的所有元素目前都在以下 JSON 中。但是,根据模式标记测试器,“suborganization”和“parentorganization”不能嵌套在“webSite”模式下。同样,SearchAction 功能和“inLanguage”也需要 WebSite 标记。
从理论上讲,我可以用 Organization 开始架构,然后标识“WebSite”,每个东西都嵌套在正确的位置。有人能够快速将内容复制+粘贴到正确的顺序以使其被识别吗?我一直在努力让一切都得到认可。
信息:ChevronWithTechron拥有ChevronExtramile品牌。那么“ExtaraMile Extras”是 ChevronExtraMile 的子站点
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebPage",
"@id": "https://www.chevronextramile.com/",
"url": "https://www.chevronextramile.com/",
"name": "Chevron ExtraMile",
"alternateName": "Chevron ExtraMile Convenience Stores, Rewards & Gas Stations",
"isPartOf": {
"@id": "https://www.chevronextramile.com/#website"
},
"primaryImageOfPage": {
"@id": "https://www.chevronextramile.com/#primaryimage"
},
"image": {
"@id": "https://www.chevronextramile.com/#primaryimage"
},
"thumbnailUrl": "https://www.chevronextramile.com/content/uploads/2021/05/extramile-storefront.jpg",
"datePublished": "2021-01-15T05:53:47+00:00",
"dateModified": "2023-02-31T15:57:32+00:00",
"description": "Earn freebies with our huge selection of snacks, coffee, and food at your convenience. Or find information on stores, stations, and deals!",
"breadcrumb": {
"@id": "https://www.chevronextramile.com/#breadcrumb"
},
"inLanguage": "en-US",
"potentialAction": [
{
"@type": "ReadAction",
"target": [
"https://www.chevronextramile.com/"
]
}
]
},
{
"@type": "ImageObject",
"inLanguage": "en-US",
"@id": "https://www.chevronextramile.com/#primaryimage",
"url": "https://www.chevronextramile.com/content/uploads/2021/05/extramile-storefront.jpg",
"contentUrl": "https://www.chevronextramile.com/content/uploads/2021/05/extramile-storefront.jpg",
"width": 1280,
"height": 853,
"caption": "ExtraMile Storefront"
},
{
"@type": "BreadcrumbList",
"@id": "https://www.chevronextramile.com/#breadcrumb",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home"
}
]
},
{
"@type": "WebSite",
"@id": "https://www.chevronextramile.com/#website",
"url": "https://www.chevronextramile.com/",
"name": "ExtraMile",
"description": "Look through our assortment of snacks, coffee, or food at your convenience. Get information on stores, stations, deals, rewards programs and more!",
"sameAs": [
"https://www.facebook.com/ExtraMileExtras",
"https://www.instagram.com/chevronextramile/",
"https://extramileextras.com/"
],
"parentOrganization": {
"@type": "Organization",
"name": "Chevron with Techron",
"url": "https://www.chevronwithtechron.com/",
"logo": "https://www.chevronwithtechron.com/content/dam/external/chevron/en_us/marketing-support/web-images/chevron-with-techron/logo.svg"
},
"subOrganization": {
"@type": "Organization",
"name": "ExtraMile Extras",
"url": "https://extramileextras.com/"
},
"potentialAction": [{
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://www.chevronextramile.com/?s={search_term_string}"
},
"query-input": "required name=search_term_string"
}],
"inLanguage": "en-US"
}
]
}
答:
0赞
Sean
3/14/2023
#1
它不进行验证,因为并且不是 WebSite 架构的属性。网站不是一个组织。但是组织可以是网站的主要实体
:subOrganization
parentOrganization
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "My Company",
"mainEntity": {
"@type": "Organization",
"name": "My Company, Inc.",
"parentOrganization": ...,
"subOrganization": ...
}
}
评论
0赞
Puttputt
3/15/2023
感谢您的评论!“mainEntity”是否意味着网站的重点是描述“组织”?如果是这样,我担心这会对爬虫表示错误的上下文。我使用“发布者”将另一个表单放在一起,然后在该表单下列出组织。在另一个站点上,我做了一些与您类似的操作,但将 WebPage 作为启动器,然后在其下使用 WebSite,以便我可以使用 SearchAction 字段。
0赞
Sean
3/15/2023
是的,这意味着该网站是关于组织的,这就是我认为您的用例。发布者似乎是合适的
0赞
Puttputt
3/16/2023
也许我没有正确理解“关于”组织意味着什么?这是一个便利店网站(继续访问 chevronextramile.com)基本上旨在推广该品牌并显示产品/信息。在你看来,你认为“组织”是否合适?
0赞
Sean
3/16/2023
我断言在这种情况下不合适。你的选择似乎是正确的about
publisher
评论
<script>