Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
599 views
in Technique[技术] by (71.8m points)

html - Schema.org/Microdata markup for list of recent posts without providing "author" / "publisher"?

The following code shows a list of links to recent posts on an experimental blog site I am playing with. The problem is that this fails Google's Structured Data Testing Tool because it is missing required items such as author and publisher.

But I don't want to show these for recent posts and I don't want to show them for every blog post either. What should I do? Get rid of the structured data? Put the required stuff in and hide it with CSS? Or leave as is?

<section>
<header>
<h4 class="h4-padding">Recent Posts</h4>
</header>
<ul>
<li>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<header itemprop="name headline">
<h5><a href="http://myblog.com/post/5/1/2016/a-very-interesting-thing">A very interesting thing</a></h5>
</header>
</article>
</li>
<li>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<header itemprop="name headline">
<h5><a href="http://myblog.com/post/30/7/2015/something-even-more-interesting">Something event more interesting</a></h5>
</header>
</article>
</li>
<li>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<header itemprop="name headline">
<h5><a href="http://myblog.com/something-very-dull">Something very dull</a></h5>
</header>
</article>
</li>
</ul>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It’s perfectly fine not to provide these properties. Schema.org doesn’t require any property.

If Google’s Structured Data Testing Tool says that certain properties are missing, what it really means is:

"If you don’t provide these properties, we won’t show the corresponding Rich Snippet or Knowledge Graph feature in Google Search"

There’s no need to get rid of your structured data just because Google (as one of many consumers) currently doesn’t do something with it. It can be useful for other consumers, and Google may change/introduce features in the future that work with your current set of properties.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...