Implicity of web page structure in Schema.org

喜夏-厌秋 提交于 2019-12-01 16:53:59
unor

The more the better (with exceptions)

When it comes to structured data, the guideline should be, in the typical case: the more the better. If you provide more structured data (i.e., you make things explicit instead of keeping them implicit), the chance is higher that a consumer finds something it can make use of.

Reasons not to follow this guideline might include:

  • You know exactly which consumers you want to support, and what they look for, and you don’t care about other (e.g., unknown or new) consumers.
  • You know that a consumer is bugged in a way that it can’t cope with certain structures.
  • You need to save as many characters as possible (bandwith/performance).
  • It’s too complex/expensive to provide additional structured data.
  • The structured data is most likely useless to any conceivable consumer.

What WebPage offers

So unless you have a reason not to, it’s probably a good idea to provide the WebPage typeif you can provide possibly interesting data. For example:

Of course it also allows you to use mainEntity, but if this were the only thing you need the WebPage item for, you could as well use the inverse property mainEntityOfPage.

More specific WebPage types

And the same is true for the more specific types, which give additional signals:

  • AboutPage if it’s a page about e.g. the site, you, or your organization.
  • CheckoutPage if it’s the checkout page in a web shop.
  • CollectionPage if it’s a page about multiple things (e.g., a pagination page listing blog posts, a gallery, a product category, …).
  • ContactPage if it’s the contact page.
  • ItemPage if it’s about a single thing (e.g., a blog posting, a photograph, …).
  • ProfilePage e.g. for user profiles.
  • QAPage if it’s … well, this very page.
  • SearchResultsPage for the result pages of your search function.

Your example

Your three cases are:

<!-- A - only the topic -->
<div itemscope itemtype="http://schema.org/Thing">
  <span itemprop="name">wireless technology</span>
</div>
<!-- B - the blog post + the topic -->
<div itemscope itemtype="http://schema.org/BlogPosting">
  <div itemprop="about" itemscope itemtype="http://schema.org/Thing">
    <span itemprop="name">wireless technology</span>
  </div>
</div>
<!-- C - the web page + the blog post + the topic -->
<div itemscope itemtype="http://schema.org/ItemPage">
  <div itemprop="mainEntity" itemscope itemtype="http://schema.org/BlogPosting">
    <div itemprop="about" itemscope itemtype="http://schema.org/Thing">
      <span itemprop="name">wireless technology</span>
    </div>
  </div>
</div>

A conveys: there is something with the name "wireless technology".
B conveys: there is a blog post about "wireless technology".
C conveys: there is a web page that contains a single blog post (as main content for that page) about "wireless technology".

While I wouldn’t recommend to use A, using B is perfectly fine and probably sufficient for most use cases. While C already provides more details than B (namely that the page is for a single thing, and that this thing is the blog post, and not some other item that might also be on the page), it’s probably not needed for such a simple case. But this changes as soon as you can provide more data, in which case I’d go with C.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!