Sha256: 50c6e094d01139bc4d1a6062dee6c21f9248cb3a9d00c08d573f1a3789ac54d1

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

<% if buoys.any? %>
  <ol itemscope itemtype='http://schema.org/BreadcrumbList' class='breadcrumb'>
    <% buoys.each.with_index(1) do |link, i| %>
      <li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
        <%# if `link.current?` is true, link.options includes {class: 'current'}. %>
        <% if link.current? %>
          <span itemprop='name'><%= link.text %></span>
          <meta itemprop='position' content='<%= i %>' />
        <% else %>
          <%= link_to link.text, link.url, link.options.merge(itemprop: :item) do %>
            <span itemprop='name'><%= link.text %></span>
          <% end %>
          <meta itemprop='position' content='<%= i %>' />
        <% end %>
      </li>
    <% end %>
  </ol>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
buoys-1.1.0 lib/generators/buoys/templates/_buoys.html.erb
buoys-1.0.0 lib/generators/buoys/templates/_buoys.html.erb
buoys-0.6.0 lib/generators/buoys/templates/_buoys.html.erb