7

新闻帖子就像

<article itemscope itemtype="http://schema.org/NewsArticle">       

  <h1 itemprop="headline">Awesome News</h1>    

  <div itemprop="articleBody">
     bla bla bla...
  </div>

</article>

如果我想包含相关新闻并标记它们怎么办?

<ul>
  <li><a href="related_news_1.html">Related News 1</a></li>
  <li><a href="related_news_2.html">Related News 2</a></li>
  <li><a href="related_news_3.html">Related News 3</a></li>
</ul>
4

1 回答 1

5

尝试使用来自 WebPage itemtype 的元素(来自: http: //schema.org/WebPage,我知道您在这种情况下使用的是 NewsArticle,但我在此示例中使用了 Article):

<div itemscope itemtype="http://schema.org/Article">
    <span itemprop="name">How to Tie a Reef Knot</span>
    by <span itemprop="author">John Doe</span>
    This article has been tweeted 1203 times and contains 78 user comments.
    <meta itemprop="interactionCount" content="UserTweets:1203" />
    <meta itemprop="interactionCount" content="UserComments:78" />
</div>


<ul itemscope itemtype="http://schema.org/WebPage">
    <li itemprop="relatedLink"><a href="related_news_1.html">Related News 1</a></li>
    <li itemprop="relatedLink"><a href="related_news_2.html">Related News 2</a></li>
    <li itemprop="relatedLink"><a href="related_news_3.html">Related News 3</a></li>
</ul>

谷歌网站管理员工具是这样看的:

在此处输入图像描述

或者,您可以这样做:

<ul itemscope itemtype="http://schema.org/WebPage">
    <li><a href="related_news_1.html" itemprop="relatedLink">Related News 1</a></li>
    <li><a href="related_news_2.html" itemprop="relatedLink">Related News 2</a></li>
    <li><a href="related_news_3.html" itemprop="relatedLink">Related News 3</a></li>
</ul>

谷歌看到它是这样的:

在此处输入图像描述

于 2013-07-11T09:21:01.247 回答