Make breadcrumbs nicer looking (#1555)

This commit is contained in:
2019-12-02 02:13:55 -06:00
committed by Dawid Potocki
parent c736a6d974
commit 1ab01944f0
4 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,8 @@
{% if forloop.last %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<link href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}" itemprop="item" />
<span itemprop="name">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</span>
<span itemprop="name">{% if page.breadcrumb %}{{ page.breadcrumb }}{% else %}{% assign words = crumb | replace:'-',' ' | remove:'.html' | split: ' ' %}{% capture titlecase %}{% for word in words %}{{ word | capitalize }} {% endfor %}{% endcapture %}{{ titlecase }}{% endif %}
</span>
<meta itemprop="position" content="{{ forloop.index }}" />
</li>
{% else %}