查看Google提供的示例here,第一个面包屑似乎已经深了1级。
我是否正确地假设主页随后被确定为根域?如果它是子域怎么办?
上面链接中的示例代码,引用:
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Books",
"item": "https://example.com/books"
},{
"@type": "ListItem",
"position": 2,
"name": "Authors",
"item": "https://example.com/books/authors"
},{
"@type": "ListItem",
"position": 3,
"name": "Ann Leckie",
"item": "https://example.com/books/authors/annleckie"
}]
}
我认为最好的答案是检查Google如何在搜索结果中显示您的页面。面包屑标记是显示搜索结果的url部分的方式的建议。
我已经看到包含“首页”页面项的标记,通过在代码段中显示“首页”会导致效果不佳。
[虽然Google曾经知道应该忽略它。
最安全的选择,不要包含根。您也不需要包括当前页面。
在schema.org文档下:
列表中的第一项以“ 1”开头
https://schema.org/BreadcrumbList
无零值(无法声明“列表中的零项”)。
此标记尚可/有效(在我的列表中home
=列表中的第一项):
home > blog
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://example.com/">
<span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://example.com/blog/">
<span itemprop="name">blog</span></a>
<meta itemprop="position" content="2" />
</li>
</ol>
SUM: Schema.org为您的内容提供语义含义。位置1可以是根域或子域。
大多数情况下,谷歌从摘录中省略“主页”(名称)(Moz为“真实源代码”示例:]