问题
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