2016-03-11 21:54:16 +01:00
|
|
|
{% case site.categories.type %}
|
|
|
|
{% when "liquid" %}
|
|
|
|
{% assign path_type = "#" %}
|
|
|
|
{% when "jekyll-archives" %}
|
|
|
|
{% assign path_type = nil %}
|
|
|
|
{% endcase %}
|
|
|
|
|
|
|
|
{% if page.collection != 'posts' %}
|
|
|
|
{% assign path_type = nil %}
|
|
|
|
{% assign crumb_path = '/' %}
|
|
|
|
{% else %}
|
|
|
|
{% assign crumb_path = site.categories.path %}
|
|
|
|
{% endif %}
|
|
|
|
|
2016-03-05 04:57:12 +01:00
|
|
|
<nav class="breadcrumbs">
|
|
|
|
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
|
|
|
|
{% assign crumbs = page.url | split: '/' %}
|
|
|
|
{% assign i = 1 %}
|
|
|
|
{% for crumb in crumbs offset: 1 %}
|
|
|
|
{% if forloop.first %}
|
|
|
|
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
|
2016-03-07 16:27:07 +01:00
|
|
|
<a href="{{ base_path }}/" itemprop="item"><span itemprop="name">{{ site.breadcrumb_home_label }}</span></a>
|
2016-03-05 04:57:12 +01:00
|
|
|
<meta itemprop="position" content="{{ i }}" />
|
|
|
|
</li>
|
|
|
|
<span class="sep">{{ site.breadcrumb_separator }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if forloop.last %}
|
|
|
|
<li class="current">{{ page.title }}</li>
|
|
|
|
{% else %}
|
|
|
|
{% assign i = i | plus: 1 %}
|
|
|
|
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
|
2016-04-04 20:20:47 +02:00
|
|
|
<a href="{{ base_path }}{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
|
2016-03-05 04:57:12 +01:00
|
|
|
<meta itemprop="position" content="{{ i }}" />
|
|
|
|
</li>
|
|
|
|
<span class="sep">{{ site.breadcrumb_separator }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
</nav>
|