【问题标题】:Which Schema.org property should I use for related articles, quizzes, stories? [closed]我应该为相关文章、测验、故事使用哪个 Schema.org 属性? [关闭]
【发布时间】:2015-08-07 16:52:39
【问题描述】:

所以有一个测验和故事网站,并且在屏幕的右侧或底部(当您进行测验或阅读故事时)应该有一些类似项目的列表,因此用户可以随时跳转时间。

故事阅读器部分的示例(测验者类似):

  • 最近的故事和/或
  • 来自同一作者的故事和/或
  • 相同类别的故事 AND/OR
  • 上周评分最高的故事等等

    • 我应该为这个列表使用什么 schema.org?我在想ItemList。我想尽可能地对 SEO 友好。 请告诉我您对以下ItemList 的看法。或者,如果您认为我应该使用其他微数据,请分享。

    • 对这个列表中的项目使用 HTML5 元素 article 是否合适,或者我应该使用其他元素,比如简单的 div

<aside id="rightSideBarAside" role="complementary" itemscope itemtype="http://schema.org/ItemList">

<article class="storyArticle1" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article">
 <h2 itemprop="name">Name1</h2>
 <a href="" itemprop="url">address1</a>
</article>

<article class="storyArticle2" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article">
 <h2 itemprop="name">Name2</h2>
 <a href="" itemprop="url">address2</a>
</article>

</aside>

【问题讨论】:

    标签: html semantic-markup schema.org microdata


    【解决方案1】:

    您的示例缺少ItemList type

    您可以将其添加到 aside 元素中,例如:

    <aside itemscope itemtype="http://schema.org/ItemList">
    
      <article itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
      </article>
    
      <article itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
      </article>
    
    </aside>
    

    对每个相关故事使用article 元素似乎是合适的,特别是如果您提供描述/预告片、作者姓名等内容。但是,如果您只提供标题和链接,您也可以使用ul 元素(不带任何标题),例如:

    <aside>
    
      <ul itemscope itemtype="http://schema.org/ItemList">
    
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
          <a href="…" itemprop="url"><span itemprop="name">…</span></a>
        </li>
    
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
          <a href="…" itemprop="url"><span itemprop="name">…</span></a>
        </li>
    
      </ul>
    
    </aside>
    

    Schema.org 的 Article 类型不提供用于引用相关 Article 项目的属性。但是WebPage 类型具有relatedLink 属性。

    因此您可以为每个页面使用WebPage 类型,并使用relatedLink 属性引用相关页面。每个WebPage 都有一个mainEntityArticle 项。

    【讨论】:

    猜你喜欢
    • 2012-12-04
    • 2020-11-04
    • 1970-01-01
    • 2011-07-26
    • 2023-03-15
    • 2011-08-25
    • 1970-01-01
    • 2011-03-13
    • 2012-08-22
    相关资源
    最近更新 更多