首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我可以使用多个http://schema.org/Organization?实例吗?

我可以使用多个http://schema.org/Organization?实例吗?
EN

Stack Overflow用户
提问于 2016-09-09 01:55:21
回答 1查看 599关注 0票数 0

我有一个列出多家公司的网站,我的标记是这样的:

代码语言:javascript
复制
<h2>Checkout those cool companies</h2>
<div itemscope="itemscope" itemtype="https://schema.org/Organization">
  <img itemprop="logo" src="logo1.jpg" alt="">
  <h3 itemprop="name">Company1</h3>
  <p itemprop="description">It's a great company</p>
  <span itemprop="url">http://company1.com</span>
</div>

<div itemscope="itemscope" itemtype="https://schema.org/Organization">
  <img itemprop="logo" src="logo2.jpg" alt="">
  <h3 itemprop="name">Company2</h3>
  <p itemprop="description">It's a great company as well</p>
  <span itemprop="url">http://company2.com</span>
</div>

<div itemscope="itemscope" itemtype="https://schema.org/Organization">
  <img itemprop="logo" src="logo3.jpg" alt="">
  <h3 itemprop="name">Company3</h3>
  <p itemprop="description">It's a amazing company</p>
  <span itemprop="url">http://company3.com</span>
</div>

我使用itemtype="https://schema.org/Organization倍数来帮助爬虫更好地识别内容。

  1. 这是https://schema.org/Organization的适当使用吗?
  2. 如何使我自己的https://schema.org/Organization不与我所列出的公司标记冲突?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-09 02:57:20

是的,为此目的使用多个Organization项是正确的。

要明确表示您自己的Organization不在此列表中,您可以

  • 将其作为author/publisher ( WebPage)的值提供,以及
  • 为其他组织的列表提供一个ItemList

如果这个组织列表是该页面的主要内容,您可以使用mainEntity (对于ItemList)并使用CollectionPage而不是WebPage

代码语言:javascript
复制
<body itemscope itemtype="http://schema.org/CollectionPage">

  <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
  </div>

  <section itemprop="mainEntity" itemscope itemtype="http://schema.org/ItemList">
    <h2>Checkout those <span itemprop="name">cool companies</span></h2>
    <article itemprop="itemListElement" itemscope itemtype="http://schema.org/Organization"></article>
    <article itemprop="itemListElement" itemscope itemtype="http://schema.org/Organization"></article>
    <article itemprop="itemListElement" itemscope itemtype="http://schema.org/Organization"></article>
  </section>

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

https://stackoverflow.com/questions/39402664

复制
相关文章

相似问题

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