Last active
January 17, 2019 06:36
-
-
Save machida/3f6628be6d46ed36aa7053cd01799c6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if breadcrumbs.present? %> | |
<ol class="breadcrumbs" vocab="http://schema.org/" typeof="BreadcrumbList"> | |
<% breadcrumbs.each_with_index do |breadcrumb, i| %> | |
<li class="breadcrumb" property="itemListElement" typeof="ListItem"> | |
<%= link_to breadcrumb.url, itemtype: "http://schema.org/Thing", itemprop: "item" do %> | |
<span property="name"> | |
<%= breadcrumb.name %> | |
</span> | |
<meta property="position" content="<%= i+1 %>"> | |
<% end %> | |
</li> | |
<% end %> | |
</ol> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- if breadcrumbs.present? | |
%ol.breadcrumbs{typeof: "BreadcrumbList", vocab: "http://schema.org/"} | |
- breadcrumbs.each_with_index do |breadcrumb, i| | |
%li.breadcrumb{property: "itemListElement", typeof: "ListItem"} | |
= link_to breadcrumb.url, itemtype: "http://schema.org/Thing", itemprop: "item" do | |
%span{property: "name"} | |
= breadcrumb.name | |
%meta{content: "#{i+1}", property: "position"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- if breadcrumbs.present? | |
ol.breadcrumbs typeof="BreadcrumbList" vocab="http://schema.org/" | |
- breadcrumbs.each_with_index do |breadcrumb, i| | |
li.breadcrumb property="itemListElement" typeof="ListItem" | |
= link_to breadcrumb.url, itemtype: "http://schema.org/Thing", itemprop: "item" do | |
span property="name" | |
= breadcrumb.name | |
meta content="#{i+1}" property="position" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment