55 lines
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
{% case site.category_archive.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.category_archive.path %}
|
|
{% endif %}
|
|
|
|
|
|
<nav class="breadcrumbs">
|
|
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
{% assign crumbs = page.url | split: '/' %}
|
|
|
|
{% if !crumbs %}
|
|
{% assign crumbs = "/Home/" | split: '/' %}
|
|
{% endif %}
|
|
|
|
{% assign i = 1 %}
|
|
{% assign current_path = '' %}
|
|
{% for crumb in crumbs offset: 1 %}
|
|
{% assign current_path = current_path | append: '/' | append: crumb %}
|
|
|
|
|
|
{% if forloop.first %}
|
|
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
<a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
|
|
<meta itemprop="position" content="{{ i }}" />
|
|
</li>
|
|
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
|
|
{% endif %}
|
|
|
|
|
|
{% if forloop.last %}
|
|
<li class="current"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</li>
|
|
{% else %}
|
|
|
|
|
|
{% assign i = i | plus: 1 %}
|
|
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
<a href="{{ current_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | url_decode | replace: '-', ' ' | replace: '_' , ' ' | capitalize }}</span></a>
|
|
<meta itemprop="position" content="{{ i }}" />
|
|
</li>
|
|
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
|
|
{% endif %}
|
|
|
|
|
|
{% endfor %}
|
|
</ol>
|
|
</nav> |