Publisher and Name Microdata

依然范特西╮ 提交于 2019-12-01 06:54:53

问题


In a BlogPosting or an Article if the publisher is a person how to use Schema.org and Microdata?

I could find that answer: Proper way to use 'publisher' in BlogPosting

<div itemprop="publisher" itemscope itemtype="http://schema.org/Person">
  <span itemprop="name">Some Name</span>
</div>

But the Google Testing Tool says:

The attribute publisher.itemtype has an invalid value

Perhaps I do not understand well well the answer? How to use publisher if it is a person or if it is the same than the author?


回答1:


That is the correct way to provide the publisher in case it’s a person.

Unfortunately, most of the time Google’s SDTT reports something as error which isn’t an error with Schema.org/Microdata, but with Google’s requirements for getting one of their rich results.

This seems to be the case here, too: it’s likely an error for the AMP version of the Articles rich result, for which Google only considers organizations (and not persons) as publishers:

publisher

Organization; required (AMP), ignored (non-AMP)

The publisher of the article.

So if the publisher is a person, simply ignore this error.

If the publisher is the same as the author, you can use both properties in the same itemprop attribute:

<div itemprop="author publisher" itemscope itemtype="http://schema.org/Person">


来源:https://stackoverflow.com/questions/43612697/publisher-and-name-microdata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!