下面的代码显示了我正在使用的一个实验性博客站点上最近文章的链接列表。问题是,这会使谷歌的结构化数据测试工具失败,因为它缺少必要的项目,如author和publisher。
但我不想在最近的文章中展示这些,我也不想在每一篇博客文章中都展示它们。我该怎么办?去掉结构化的数据?把需要的东西放进去,然后用CSS把它藏起来?还是按原样离开?
<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>发布于 2016-02-25 13:47:00
不提供这些属性是非常好的。Schema.org不需要任何属性。
如果Google的结构化数据测试工具说某些属性丢失了,那么它真正的意思是:
“如果您不提供这些属性,我们将不会在Google搜索中显示相应的富片段或知识图功能”
因为谷歌(作为众多消费者之一)目前还没有对其做些什么,就有no need来处理您的结构化数据。它可能对其他消费者很有用,Google可能会在将来更改/引入使用当前属性集的特性。
https://stackoverflow.com/questions/35610102
复制相似问题