我看了一下Google提出的结构化数据这篇文章,发现有一个新的必需和推荐字段,它们上周没有出现。以下是链接:
https://developers.google.com/structured-data/rich-snippets/articles
列表中的第一个属性是:
我不明白这房子的价值是多少?这是什么财产?它是否链接到:
..or链接到当前的博客文章,如:
他们的示例代码中有这样的内容:
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article" />这是我目前所拥有的,它还不符合测试工具的规则--我仍然忙于添加所有必需的属性,同时尝试在那里添加推荐的属性:
<div itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline">
<a href="http:///www.example.com/blog/1001/my-blog-article" itemprop="url">My Blog Article</a>
</h1>
<p>Written by
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Mase Kind</span>
</span> on
<time itemprop="datePublished" datetime="2015-11-16T15:30:00+02:00">November 16, 2015</time>
<meta itemprop="dateModified" content="2015-12-10T12:29:00+02:00" />
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="http://schema.org/ImageObject"></div>
<meta itemprop="name" content="My Company Name" />
</div>
</p>
<div itemprop="articleBody">
<p>first article body</p>
</div>
</div>我的文件中也有这样的内容:
<body itemscope itemtype="http://schema.org/WebPage">
...
</body>这与谷歌提供的代码样本有任何冲突吗?
发布于 2019-02-04 15:30:43
这是什么财产?
它是对url和sameAs属性的补充,如mainEntity背景中所述。
它有一个特殊的名称,因为它可以应用于Thing类型的所有项。如果它只应用于Articles,那么它可能被称为mainTopic/mainTopicOfArticle,并且更加清晰。
我不明白这房子的价值是多少?
属性的值应该是CreativeWork类型的项或引用工作根据 Schema.org的URL。这意味着它也可以是一个Article或BlogPosting,正如您所提到的。但是,如果您正在构建AMP页面,则值应该是一个URL。
这与谷歌提供的代码样本有任何冲突吗?
尽管谷歌的结构化数据测试工具说,他们的文件不再建议对非AMP页面使用mainEntityOfPage,所以您可以随意省略它。
https://webmasters.stackexchange.com/questions/87940
复制相似问题