4

我想知道是否有人可以提供帮助?

在 Google 宣布将记录在线食谱的 RDFa / Microformats 之后,我一直在研究我运行的几个基于食谱的网站。然而,我们根本没有满足任何标准所需的所有数据。

这有关系吗?搜索引擎爬虫是否仍会充分利用他们所找到的内容,或者由于缺少一些元素(如评论或食谱评级),我是否会浪费我的时间来实现这一点?

另外,如果出于格式原因,我必须在信息周围添加额外的 div,这是否会使这一切失效?

干杯,H

4

2 回答 2

3

查看hRecipe草案规范。

hRecipe 模式包含以下属性:

* hrecipe
      o fn. required. text. the name of the recipe.
      o ingredient. required. 1 or more. text with optional valid (x)HTML markup.
            + value and type. optional. [experimental] 
      o yield. optional. text.
      o instructions. optional. text with optional valid (x)HTML markup.
      o duration. optional. 1 or more. text.
      o photo. optional. 1 or more. using any element containing a URL, such as IMG. [experimental]
      o summary. optional. text. [experimental]
      o author. optional. 1 or more. [experimental]
      o published. optional. [experimental]
      o nutrition. optional. 1 or more. [experimental]
            + value and type. optional. [experimental] 
      o tag. optional. 1 or more. [experimental] 

如果您查看必填字段fn并且ingredient是必填字段,则其他字段是可选的。
以下示例是有效的 hRecipe 配方:

  <div class="mydivclass1">
   <h1 class="fn">Spaghetti al ragù</h1>
     <div class="myfancydiv2>Ingredients:</div>
   <span class="ingredient">
      spaghetti
   </span>
   <span class="ingredient">
      ragù
   </span>
 </div>

要检查您的微格式,您可以使用酷炫的Optimus 验证器

于 2010-04-23T19:44:59.500 回答
1

唯一的“必须拥有”标签是配方的名称,fn如果您使用微格式,则为类。然而,这必须是具有hrecipe类名的父级的子级,以帮助索引器区分特殊数据和标准文本。

但!对此的支持刚刚发布,我无法告诉您仅包含配方名称是否会对您有任何帮助;由于这是一些更改的问题,因此您可能希望在一个站点上对其进行测试,等待几周,如果可行,则将其应用于其余站点。

关于额外的DIV,它不应该有任何区别。

于 2010-04-23T18:20:14.313 回答