2012-10-26 52 views
5

我已經測試了與谷歌的豐富網頁摘要測試工具Schema.org breadcrumb例如不展示。麪包屑與Schema.org在谷歌的豐富網頁摘要測試工具

<div itemprop="breadcrumb"> 
    <a href="category/books.html">Books</a> > 
    <a href="category/books-literature.html">Literature & Fiction</a> > 
    <a href="category/books-classics">Classics</a> 
</div> 

結果是,它不被工具識別。

那麼,有沒有一個bug還是有語法問題?如果是這樣,那麼正確的語法是什麼?

回答

3

您可以使用微數據標記的麪包屑在this Google link

建議這必將反映在谷歌的豐富網頁摘要測試工具。

+4

是的,這是做它的方式;目前我們不支持豐富網頁摘要的schema.org麪包屑標記,因此您需要使用其他文檔格式之一。 http://www.w3.org/2011/webschema/track/issues/10也有一些關於差異的細節。 –

+0

@JohnMueller是否會支持當前的schema.org breadcrumb標記? Microdata和Microformats豐富片段版本的詳細程度對您的頁面速度非常不利,並且引入了相當大的膨脹,而當前的架構。org breadcrumb非常短暫並且重要。或者你是否有一個RDFa Lite對流水線中的typeof = breadcrumb的支持,可能不那麼冗長? – hexalys

+1

@Bry我不能評論未來會發生什麼,但是從我鏈接到的錯誤來看,我認爲模式需要先改變。一旦我們有一個好的標記使用,我們一定會努力支持。 –

0

網頁或MedicalWebPage應的頁面,項目類型上進行設置。

6

你的問題是有點用相同的這一個How to implement schema.org markup for a breadcrumb?

Google Webmaster Central Help Forum,它不是專家推薦使用schema.org麪包屑標記爲暫時的,它似乎是「有某種的schema.org麪包屑結構中的小故障「。 相反,它告誡使用data-vocabulary.org痕跡標記,其中谷歌和其他搜索引擎可以輕鬆地閱讀爲好。

一個data-vocabulary.org麪包屑標記示例:

<div> 
    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> 
    <a href="http://www.example.com/" itemprop="url"> 
     <span itemprop="title">example</span> 
    </a> > 
    </span> 
    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> 
    <a href="http://www.example.com/fashion/" itemprop="url"> 
     <span itemprop="title">Fashion</span> 
    </a> > 
    </span> 
    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> 
    <a href="http://www.example.com/fashion/women/" itemprop="url"> 
     <span itemprop="title">Women</span> 
    </a> > 
    </span> 
    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> 
    <a href="http://www.example.com/fashion/women/boots/" itemprop="url"> 
     <span itemprop="title">Boots</span> 
    </a> 
    </span> 
</div> 
0

實際上,你可以立即開始使用基於schema.org麪包屑標記。谷歌支持它,它很好。你可以選擇你的格式JSON-LD(首選),RDFa,微數據。另一件好事是,如果你的產品需要它,你可以定義多個麪包屑,通常情況就是這樣。

使用微的支持,你可以這樣做:

<ol itemscope itemtype="http://schema.org/BreadcrumbList"> 
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
    <a itemprop="item" href="https://www.yoursite.com"> 
     <span itemprop="name">Home</span></a> 
    <meta itemprop="position" content="1" /> 
    </li> 
    › 
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
    <a itemprop="item" href="https://www.yoursie.com/category/books.html"> 
     <span itemprop="name">Books</span></a> 
    <meta itemprop="position" content="2" /> 
    </li> 
    › 
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
    <a itemprop="item" href="https://www.yoursie.com/category/books-literature.html"> 
     <span itemprop="name">Literature & Fiction</span></a> 
    <meta itemprop="position" content="3" /> 
    </li> 
    › 
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
    <a itemprop="item" href="https://www.yoursie.com/category/books-classics.html"> 
     <span itemprop="name">Classics</span></a> 
    <meta itemprop="position" content="4" /> 
    </li> 
</ol> 

注意位置值的使用,並且它建議使用有序列表(「OL」)。

當你這樣做後,你可以要求谷歌顯示你的網站名稱,而不是在位置#1的'家'。爲了實現這一目標,用這個在您的主頁:

<head itemscope itemtype="http://schema.org/WebSite"> 
<title itemprop='name'>Your Site Name</title> 
<link rel="canonical" href="http://www.yoursite.com" itemprop="url"> 

什麼,這裏指:https://developers.google.com/structured-data

相關問題