首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在没有提供“作者”/“发布者”的情况下,Schema.org/Microdata标记用于最近的帖子列表?

在没有提供“作者”/“发布者”的情况下,Schema.org/Microdata标记用于最近的帖子列表?
EN

Stack Overflow用户
提问于 2016-02-24 18:26:32
回答 1查看 863关注 0票数 0

下面的代码显示了我正在使用的一个实验性博客站点上最近文章的链接列表。问题是,这会使谷歌的结构化数据测试工具失败,因为它缺少必要的项目,如authorpublisher

但我不想在最近的文章中展示这些,我也不想在每一篇博客文章中都展示它们。我该怎么办?去掉结构化的数据?把需要的东西放进去,然后用CSS把它藏起来?还是按原样离开?

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-25 13:47:00

不提供这些属性是非常好的。Schema.org不需要任何属性。

如果Google的结构化数据测试工具说某些属性丢失了,那么它真正的意思是:

“如果您不提供这些属性,我们将不会在Google搜索中显示相应的富片段或知识图功能”

因为谷歌(作为众多消费者之一)目前还没有对其做些什么,就有no need来处理您的结构化数据。它可能对其他消费者很有用,Google可能会在将来更改/引入使用当前属性集的特性。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35610102

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档