【发布时间】:2016-02-08 08:55:24
【问题描述】:
我有一个包含多篇文章的页面,我希望每篇文章都将发布者描述为一个组织,但我想避免为每篇文章重新定义该组织。这可能吗?
itemref 属性似乎只在相反的方向工作,指定父 > 子关系,而不是相反。
在此示例中,我从 Schema.org 中获取了组织示例,希望能说明问题 - 您不能每次都重复此标记,它会使页面膨胀。
<div itemscope itemtype="http://schema.org/Organization">
<span itemprop="name">Google.org (GOOG)</span>
Contact Details:
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
Main address:
<span itemprop="streetAddress">38 avenue de l'Opera</span>
<span itemprop="postalCode">F-75002</span>
<span itemprop="addressLocality">Paris, France</span>
,
</div>
Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>,
Fax:<span itemprop="faxNumber">( 33 1) 42 68 53 01 </span>,
E-mail: <span itemprop="email">secretariat(at)google.org</span>
Members:
- National Scientific Members in 100 countries and territories: Country1, Country2, ...
- Scientific Union Members, 30 organizations listed in this Yearbook:
List of Alumni:
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Jack Dan</span>
</span>,
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">John Smith</span>
</span>
</div>
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemprop="url" content="{{canonical_url}}" />
<link itemprop="mainEntityOfPage" href="{{canonical_url}}">
<meta itemprop="genre" content="{{genre}}" />
<meta itemprop="publisher" temtype="http://schema.org/Organization" content="{{???}}" />
<meta itemprop="dateModified" content="{{updated_at}}" />
<div class="item-content">
<div class="item-header" itemprop="name headline">
{{Headline}}
</div>
<div class="item-body">
<p itemprop="articleBody">
{{content goes here}}
</p>
</div>
<div class="item-footer">
<span itemprop="datePublished dateCreated">{{date}}</span> - <span itemprop="creator author copyrightHolder">{{byline}}</span>
</div>
</div>
</div>
我目前正在使用微数据,但如果我正在尝试使用 JSON,那么我会考虑切换。
【问题讨论】:
标签: schema.org microdata json-ld