mirror of
https://github.com/discourse/discourse.git
synced 2025-06-23 04:22:10 +08:00
Attempt micro data using old vocubulary
Seeing weird results on Google
This commit is contained in:
@ -4,14 +4,16 @@
|
|||||||
|
|
||||||
<% @breadcrumbs = categories_breadcrumb(@topic_view.topic)
|
<% @breadcrumbs = categories_breadcrumb(@topic_view.topic)
|
||||||
if @breadcrumbs.present? %>
|
if @breadcrumbs.present? %>
|
||||||
<div itemscope itemtype='http://schema.org/BreadcrumbList'>
|
<div id='breadcrumbs'>
|
||||||
<% @breadcrumbs.each_with_index do |c,i| %>
|
<% @breadcrumbs.each_with_index do |c,i| %>
|
||||||
<span itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
<div id="breadcrumb-<%=i%>" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"
|
||||||
<%= link_to c[:url], itemprop: 'item' do %>
|
<%-if (i+1) < @breadcrumbs.length%>
|
||||||
<span itemprop='name'><%= c[:name] %></span>
|
itemref="breadcrumb-<%=(i+1)%>"
|
||||||
<% end %>
|
<%-end%>>
|
||||||
</span>
|
<a href="<%=c[:url]%>" itemprop="url">
|
||||||
<meta itemprop='position' content='<%= i + 1 %>'>
|
<span itemprop="title"><%=c[:name]%></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Reference in New Issue
Block a user