大网数据广告活动
网站运营与故障问答

Structured Data (schema.org) ItemList, Article, or both?

· 52CE 我爱测

I am adding structured data to a new page which could sensibly be defined as either an article ( http://schema.org/Article ) or an Item List ( http://schema.org/ItemList ), as it is a news article about a new top 10, where all 10…

问题原文

原帖链接 · petesiss · CC BY-SA 3.0

I am adding structured data to a new page which could sensibly be defined as either an article (http://schema.org/Article) or an Item List (http://schema.org/ItemList), as it is a news article about a new top 10, where all 10 items exist on their own pages elsewhere on our site.

So this page has a title, author, some unique content, a publish date... but it also has a ranked list of items.

Is there a best practice for use of schema.org structured data that would add weight to going with one or the other? Or could we even use both definitions on the same page to define the list within the article?

已采纳解答

原帖链接 · unor · CC BY-SA 3.0

You can use both, if the ItemList is the primary thing the Article is about.

Use the mainEntity property of the Article type to provide the ItemList.

mainEntity is typically used to denote the primary thing a WebPage is about (e.g., probably the Article in your case), but this is not the only way how it can be used (bold emphasis mine):

Indicates the primary entity described in some page or other CreativeWork.

You could use mainEntity for both ways in the same document:

<body vocab="http://schema.org/" typeof="ItemPage">

  <article property="mainEntity" typeof="Article">

    <ul property="mainEntity" typeof="ItemList">
    </ul>

  </article>

</body>

If the ItemList is not the primary thing the Article is about, there doesn’t seem to be a suitable property to link these items. The hasPart property can’t be used, because it expects a CreativeWork as value, but ItemList isn’t one.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-07-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。