出版商和名称微数据
Publisher and Name Microdata
如果发布者是个人,在 BlogPosting 或文章中如何使用 Schema.org 和 Microdata?
我能找到答案:
<div itemprop="publisher" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Some Name</span>
</div>
但是 Google Testing Tool 说:
The attribute publisher.itemtype has an invalid value
也许我没看懂好不好回答? publisher
如果是一个人或者与作者相同怎么用?
如果发布者是个人,这是提供发布者的正确方式。
不幸的是,大多数时候 Google 的 SDTT 报告一些错误,这不是 Schema 的错误。org/Microdata,但是 Google 的获取要求他们丰富的成果之一。
这似乎也是这种情况:Articles rich result 的 AMP 版本可能存在错误,Google 仅将组织(而不是个人)视为发布者:
publisher
Organization
; required (AMP), ignored (non-AMP)
The publisher of the article.
所以如果发布者是个人,直接忽略这个错误。
如果发布者与作者相同,您可以在同一个 itemprop
属性中使用这两个属性:
<div itemprop="author publisher" itemscope itemtype="http://schema.org/Person">
如果发布者是个人,在 BlogPosting 或文章中如何使用 Schema.org 和 Microdata?
我能找到答案:
<div itemprop="publisher" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">Some Name</span> </div>
但是 Google Testing Tool 说:
The attribute publisher.itemtype has an invalid value
也许我没看懂好不好回答? publisher
如果是一个人或者与作者相同怎么用?
如果发布者是个人,这是提供发布者的正确方式。
不幸的是,大多数时候 Google 的 SDTT 报告一些错误,这不是 Schema 的错误。org/Microdata,但是 Google 的获取要求他们丰富的成果之一。
这似乎也是这种情况:Articles rich result 的 AMP 版本可能存在错误,Google 仅将组织(而不是个人)视为发布者:
publisher
Organization
; required (AMP), ignored (non-AMP)The publisher of the article.
所以如果发布者是个人,直接忽略这个错误。
如果发布者与作者相同,您可以在同一个 itemprop
属性中使用这两个属性:
<div itemprop="author publisher" itemscope itemtype="http://schema.org/Person">